Connecting Tech Pros Worldwide Help | Site Map

Formatting text in RichTextBox ...

Hariharan S
Guest
 
Posts: n/a
#1: Nov 15 '05
Hi Guys,

I have a string, say "Hello World" and would like to format the way I want
to (say, wanna have the Hello to be bold italic and the World to be of font
size 14 or so) and put it in the RichTextBox, I created.

Just want to paste or write this string to the RichTextBox; what command
should I use? I used the following command and it did not help ...

richTextBox.SelectionFont = <some font selected>
richTextBox.Text = "Hello World";

Even the Paste() command is of no help as it writes to the RichTextBox in
black color with the default font (even though the color and the font I
applied are totally different. Any help on this is greatly appreciated.
Thanks in advance.

Regards,
Hariharan S



Closed Thread