font issue

kulrom

Member
Joined
May 10, 2005
Messages
7
How to change a font of text object of CR in runtime?

actually im passing value of textBox (win form) to text Object (.rpt) and i want to set up its font style ... for instance i found that it works well for color property i.e.
Code:
{...}
txtCR.Color = Color.CadetBlue //works

but this doesnt:
Code:
txtCR.Font = Font.Italic //this throws an intelisense warning "font is read-only property"

Thanks in advance :)
 
You have to assign it to a new font object...
Code:
txtCR.Font = New Font(txtCR.Font, FontStyle.Italic)
(from vb2005, might be different in earlier versions)

HTH
/Kejpa
 
Back
Top