Ahh, I see. Maybe you want to set the Rtf property?
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWindowsFormsRichTextB
oxClassRtfTopic.htm
http://msdn.microsoft.com/library/en...ssRtfTopic.asp
http://www.devhood.com/messages/mess...hread_id=91124
To append, I would assume just doing
rtb.Rtf += RtfToAppend;
would work.
If you do not have the actual RTF text, then this may be an easier way: you
can apply formats to the text, then append the text, then unapply the
formats.
For example, you can do this to turn on boldface:
System.Drawing.Font currentFont = this.richTextBox1.SelectionFont;
this.richTextBox1.SelectionFont = new Font(
currentFont.FontFamily,
currentFont.Size,
FontStyle.Bold
);
this.richTextBox1.AppendText("This text appears in bold");
Then as you append text, it is bolded.
You can apply the same approach to turn on Italic, bullets, indentation,
etc.
For colors, it is similar:
this.richTextBox1.SelectionColor =
System.Drawing.Color.FromName("Green");
this.richTextBox1.AppendText("This text appears in green");
this.richTextBox1.SelectionColor =
System.Drawing.Color.FromName("Black");
"Olivier" <(E-Mail Removed)> wrote in message
news:08ec01c3b4c1$191a2ee0$(E-Mail Removed)...
>
> The AppendText() method can only add text (not rtf
> formated text !)
>
>
>
> >-----Original Message-----
> >rtb.AppendText() ??
> >
> >"Olivier" <(E-Mail Removed)> wrote in
> message
> >news:754401c3b42c$50752100$(E-Mail Removed)...
> >> Hi
> >>
> >> How can I append RTF formated text in a RichTextBox ?
> >>
> >> Thanks
> >>
> >> Olivier
> >
> >
> >.
> >