Link to home
Start Free TrialLog in
Avatar of jam8b
jam8b

asked on

Appending text to a RichTextBox control

I'm trying to use a RichTextBox to log the results of a database maintenance tool. What I am looking for is a function that will append text to the end of the control that can make the text a given color, bold, italic, etc...  For instance I would like to have the category headings in bold and any errors logged in red as the tool is running.

I've tried using rtb.Text = rtb.Text & newString, and then selecting and formating the new string, but this will wipe out the previous formatting.

I've been moderately successful using the TextRTF property to make the text bold, but I haven't been able to get it to display the text in different colors.
ASKER CERTIFIED SOLUTION
Avatar of Smallint
Smallint

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial