Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to change the Font.Height for change the space interlinear in a richtextbox, but the property Font.Height it`s only to read....
Any idea?????
Please, i need help
Posted
Comments
ambarishtv 2-Jun-11 6:54am    
Tag it..

As you've discovered, Font.Height is an emergent property, and can't be set directly. It is the outcome of the Size property, which you set in the constructor (nothing about Fonts is mutable later).

RTF supports inter-line spacing (\sl), so you shouldn't need to mess with the font, just put a \sl tag in the paragraph you want to be spaced differently. It's possible that the RichTextBox doesn't respect it, though (there is lots of valid RTF it ignores).
 
Share this answer
 
Thanks BobJanova, but when for example ido:

richTextBox1.Font = new Font(richTextBox1.Font.FontFamily,(teleprompt.f3.richTextBox1.Font.Size+5.0F));


This code change the intrlinear space, but also change the size of the letters...
I need chage the interlinear space without change the size of the letters.
Any idea?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900