Formatting text in RichTextBox ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hariharan S

    Formatting text in RichTextBox ...

    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.Sel ectionFont = <some font selected>
    richTextBox.Tex t = "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



Working...