Greetings.
I have a problem recognizing how to address all the StiText objects in a report. I managed as far as getting the components from the report page like this:
StiComponentsCollection compColl = TimesReport.Pages["Page1"].GetComponents();
foreach (StiComponent comp in compColl)
{
}
Now how should I proceed in detecting all the StiText components in order to change the Font property, discarding all other objects?
Thanks
Adam Jochelson
Changing font in all StiText objects
Changing font in all StiText objects
You should add the following lines to your code:adamjoch wrote:Greetings.
I have a problem recognizing how to address all the StiText objects in a report. I managed as far as getting the components from the report page like this:
StiComponentsCollection compColl = TimesReport.Pages["Page1"].GetComponents();
foreach (StiComponent comp in compColl)
{
}
Now how should I proceed in detecting all the StiText components in order to change the Font property, discarding all other objects?
Thanks
Adam Jochelson
Code: Select all
if (comp is Stimulsoft.Report.Components.StiText)
{
(comp as Stimulsoft.Report.Components.StiText).Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
}
Changing font in all StiText objects
I did that and it works. That's just what I needed.
Many thanks
Many thanks
Changing font in all StiText objects
Please contact us any time you need help.
Thank you.
Thank you.