RichTextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a RichTextBox on a Windows form. I would like to dynamically add text
to it in the following manner:

(in bold)
Name:

(normal)
Yama

(in red color and bold)
Alert Notes:

(normal)
This is an alert note...

Is this possible using the System.Windows.Forms.RichTextBox control?

Thanks,

Yama
 
You need to do something like this:

richTBox.SelectionFont = new Font(richTBox.SelectionFont, FontStyle.Bold);
richTBox.AppendText("Name:");

and so on. Have a look at the documention for RichTextBox on
http://msdn.microsoft.com/library
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top