471,356 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

Coloring text

Hi,

how can I automatically change the color of specific words in my RichTextBox
(VB .NET). The feature I want to create is similar to the feature that's
included in VS.NET: Some specific keywords are colored. How can this be done?

Thanks,
Peter
Jul 21 '05 #1
2 1075
You can use
richTextBox1.SelectionColor
richTextBox1.SelectionFont

http://www.syncfusion.com/FAQ/Window...89c.aspx#q640q

With Regards
Kunal Cheda
http://www.Google.com
"Peter Schmitz" wrote:
Hi,

how can I automatically change the color of specific words in my RichTextBox
(VB .NET). The feature I want to create is similar to the feature that's
included in VS.NET: Some specific keywords are colored. How can this be done?

Thanks,
Peter

Jul 21 '05 #2
Use SelectionColor property

Eg

RichTextBox1.Text = "This is Sample Text"
RichTextBox1.Select(8, 6)
RichTextBox1.SelectionColor = Color.Blue
RichTextBox1.Select(0, 0)

Rgrds
Ramesh Krishnamoorthy
"Peter Schmitz" wrote:
Hi,

how can I automatically change the color of specific words in my RichTextBox
(VB .NET). The feature I want to create is similar to the feature that's
included in VS.NET: Some specific keywords are colored. How can this be done?

Thanks,
Peter

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Ruthless | last post: by
5 posts views Thread by Sami Viitanen | last post: by
1 post views Thread by Afanasiy | last post: by
2 posts views Thread by Larry Werner | last post: by
reply views Thread by Markk | last post: by
2 posts views Thread by Dan | last post: by
7 posts views Thread by braver | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.