How can I change text size in run time mode with a datapad
How can I change text size in run time mode with a datapad
Hi,
I need to change the text size in run time with a value obtained from a datapad
For example
Text1.Fontsize = {pa_Datapad.ValueSize}
The problem is that I find the correct syntax (if you can assign the size )
What event should include the code? ( I guess before printing the page).
Thank you for your help.
I need to change the text size in run time with a value obtained from a datapad
For example
Text1.Fontsize = {pa_Datapad.ValueSize}
The problem is that I find the correct syntax (if you can assign the size )
What event should include the code? ( I guess before printing the page).
Thank you for your help.
Re: How can I change text size in run time mode with a datap
Hello,
As a way, you can use the Condition(in which set the necessary font size) for the Text component for this task.
Thank you.
As a way, you can use the Condition(in which set the necessary font size) for the Text component for this task.
Thank you.
Re: How can I change text size in run time mode with a datap
Hello Aleksey
Not, I need the text size from a variable. The value of this size should be obtained from a datapad .
Thank you
Not, I need the text size from a variable. The value of this size should be obtained from a datapad .
Thank you
Re: How can I change text size in run time mode with a datap
Hello,
As a way you can use the following code in the BeforePrint event:
Text1.Font = new System.Drawing.Font("Arial", pa_Datapad.ValueSize);
Thank you.
As a way you can use the following code in the BeforePrint event:
Text1.Font = new System.Drawing.Font("Arial", pa_Datapad.ValueSize);
Thank you.
Re: How can I change text size in run time mode with a datap
Hello and thanks again
I write the following code in BeforePrint Event of the Text1 object
Text1.font=new System.Drawing.Font("Arial",pa_infCertificateAttendance.Ds_CertificateText1Size);
I get the following error:
1. The error of compilation
The error of compilation is found in the 'BeforePrint' event of the 'Text1' component:
'Stimulsoft.Report.Components.StiText' no contiene una definición de 'font' ni se encontró ningún método de extensión 'font' que acepte un primer argumento de tipo 'Stimulsoft.Report.Components.StiText' (¿falta una directiva using o una referencia de ensamblado?)
Sorry, i select UI Language English but part of the message is displayed in Spanish.
A rough translation would be:
1. The error of compilation
The error of compilation is found in the 'BeforePrint' event of the 'Text1' component:
'Stimulsoft.Report.Components.StiText' not have a definition of 'font' and no extension method 'font' accepting a first argument of type 'Stimulsoft.Report.Components.StiText' (¿lack a directive using or a assembly reference?)
I write the following code in BeforePrint Event of the Text1 object
Text1.font=new System.Drawing.Font("Arial",pa_infCertificateAttendance.Ds_CertificateText1Size);
I get the following error:
1. The error of compilation
The error of compilation is found in the 'BeforePrint' event of the 'Text1' component:
'Stimulsoft.Report.Components.StiText' no contiene una definición de 'font' ni se encontró ningún método de extensión 'font' que acepte un primer argumento de tipo 'Stimulsoft.Report.Components.StiText' (¿falta una directiva using o una referencia de ensamblado?)
Sorry, i select UI Language English but part of the message is displayed in Spanish.
A rough translation would be:
1. The error of compilation
The error of compilation is found in the 'BeforePrint' event of the 'Text1' component:
'Stimulsoft.Report.Components.StiText' not have a definition of 'font' and no extension method 'font' accepting a first argument of type 'Stimulsoft.Report.Components.StiText' (¿lack a directive using or a assembly reference?)
Re: How can I change text size in run time mode with a datap
Hello,
In your code, please write Text1.font where the word Font must be in the capital letter.
The line must be Text1.Font=new System.Drawing.Font("Arial",pa_infCertificateAttendance.Ds_CertificateText1Size);
Does this help you solve the problem?
In your code, please write Text1.font where the word Font must be in the capital letter.
The line must be Text1.Font=new System.Drawing.Font("Arial",pa_infCertificateAttendance.Ds_CertificateText1Size);
Does this help you solve the problem?
Re: How can I change text size in run time mode with a datap
OK Andrew, it´s perfect
Thank you very much
But i have more problems.
Where I can find documentation about the methods and properties that can be applied to these and other objects ?
For example , I need to dynamically change also the color of the text object or the color of an object panel.
Thanks again for all your help .
Regards.
Thank you very much
But i have more problems.
Where I can find documentation about the methods and properties that can be applied to these and other objects ?
For example , I need to dynamically change also the color of the text object or the color of an object panel.
Thanks again for all your help .
Regards.
Re: How can I change text size in run time mode with a datap
Hello,
Unfortunately, there is not documentation by the similar task.
The simple way - is a create necessary report in the standalone designer, set the necessary properties then open Code tab and use the similar code.
Thank you.
Unfortunately, there is not documentation by the similar task.
The simple way - is a create necessary report in the standalone designer, set the necessary properties then open Code tab and use the similar code.
Thank you.