Inserting Text with Formatting

G

Guest

Hi

I need to enter text into a RichTextBox control in code, is there a way to
ensure that the text I'm about to insert is inserted with a particular font
style? The newly inserted text should not affect the text or font style of
the existing text.

Many thanks

Craig
 
H

Herfried K. Wagner [MVP]

Craig said:
I need to enter text into a RichTextBox control in code, is there a way to
ensure that the text I'm about to insert is inserted with a particular
font
style? The newly inserted text should not affect the text or font style
of
the existing text.

Check out the control's 'SelectionFont' property.
 
G

Guest

Hi Herfried

I've had a look at the SelectionFont property and determined that it's
probably the best approach. Do you have any suggestions to appending text to
a RichTextBox that has already had a font style applied, say from one text
RTB to another, without modifiying the font style of the existing RTB?

Craig
 

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