Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How to change a font of text object of CR in runtime?

 

actually i'm 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.

{...}
txtCR.Color = Color.CadetBlue //works 

 

but this doesn't:

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

 

Thanks in advance :)

Posted

You have to assign it to a new font object...

txtCR.Font = New Font(txtCR.Font, FontStyle.Italic)

(from vb2005, might be different in earlier versions)

 

HTH

/Kejpa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...