Adding multi colour text to rich text control

J

John

Hi

How can I add some txt in red and other in grey to a rich text control?

Thanks

Regards
 
H

Herfried K. Wagner [MVP]

John said:
How can I add some txt in red and other in grey to a rich text control?

Take a look at the overloaded 'Select' method and the control's
'SelectionColor' property.
 
J

John

Hi

Thanks for that. I am not sure how to do it. For instance I am appending two
lines and I want both in different colours like this;

My.Forms.frmMyForm.txtMyRichText.AppendText("This text needs to be in
black")

My.Forms.frmMyForm.txtMyRichText.AppendText("This text needs to be in red")

Thanks

Regards
 

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

Top