Code: Select all
foreach (StiPage page in report.Pages)
{
page.SelectAll();
page.SetFont(font);
}
I'd like to change only the font, but not the size and the style.
How do I do that in code?
Thanks a lot!
Marco
Code: Select all
foreach (StiPage page in report.Pages)
{
page.SelectAll();
page.SetFont(font);
}
Code: Select all
StiComponentsCollection comps = report.GetComponents();
foreach (StiComponent comp in comps)
{
IStiFont font = comp as IStiFont;
if (font != null)
{
font.Font = new Font(
newFont,
font.Font.Size,
font.Font.Style,
font.Font.Unit,
font.Font.GdiCharSet,
font.Font.GdiVerticalFont);
}
}