problem of RichTextBox

F

Franz

I have a RichTextBox which uses font A. But when I input text into it, the
font of the new words is not font A.
I haven't set the SelectionFont property.
But if I execute the following line of code, the font of the new words
changes to font A
aRichTextBox.Text = aRichTextBox.Text;

Does anyone have idea on solving my problem?
 
G

Gonzalo Rodriguez

Hi,

Try
aRichTextBox.Rtf = aRichTextBox.Rtf;

because it sets or gets the text "with" the format codes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top