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/e...ystemWindowsFormsRichTextBoxClassRtfTopic.asp
http://www.devhood.com/messages/message_view-2.aspx?thread_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");