473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1111
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ruthless | last post by:
hello. I've got a simple question. I've searched on google for PHP scripts coloring syntax e.g. asm, c, c++, bash etc. I've only found some CGI, apps, modules for Apache - but i can't use...
2
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
5
by: Sami Viitanen | last post by:
Hello, Is there an easy way to make script print text with differents colors to screen (shell)? I mean a script that can for example print lines in red if some error occurs in executing some...
1
by: Afanasiy | last post by:
What's the best method for coloring simple markup? <xyz att="val" att="val"> You can assume it is not HTML or XML or valid anything except markup which happens to look somewhat like them. ...
2
by: Larry Werner | last post by:
We have source files with extension ".pc", which we would like to be treated by the text editor as if they are ".cpp" files for the purpose of syntax coloring. In Visual C++ 6.0 we could do that...
5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
0
by: Markk | last post by:
Hi. I would like to ask If somebody don't have any small sample to coloring XML syntax, e.g. in RichTextBox. It can be in VB.NET or C#. I watched on SharpDevelop, but I could not understand...
2
by: Dan | last post by:
I'd like to show some XML text into an (editable) text box with some syntax coloring for tags, attributes etc. I don't need a full-blown commercial control, I'd just like to do some coloring on...
7
by: braver | last post by:
Greetings -- as a long time user of both Python and Ruby interpreters, I got used to the latter's syntax-coloring gem, wirble, which colorizes Ruby syntax on the fly. Is there anything similar for...
3
by: sandromani | last post by:
Hi all, I am writing a webbased notepad and want to include syntax-coloring. The approach I have used is to set the font color and background color of the textarea to transparent, and place the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.