TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ParadoX
NA
1
0
Richtextbox: Coloring words knowing their index ?
Jun 4 2008 11:45 AM
Hi !
I've been trying to color words in a RichTextBox in red. I made this and it works:
foreach (string sentence in splittedOriginalText)
{
richTextBox1.SelectionColor = Color.Black;
for (int i = 0; i < keywords.Length; i++)
{
if (keywords
== sentence.ToLower())
{
richTextBox1.SelectionColor = Color.Red;
break;
}
}
richTextBox1.SelectedText = sentence + " ";
}
Now things have changed. I don't have any keywords to compare my words to, but only the index of the words that need to be colored. I've been trying, but somehow it won't work ... any idea to help me out here ?
Reply
Answers (
1
)
Autosize picture box
serial port communication in C#