How to color different words in RichTextBox with different colors?
How are the colored sections of the RichTextBox differently?
string text = "a b c d teste";
// words to highlight
string[] word = { "a", "b", "c", "d" };
// colors to use, aligned with words above
Color[] color = { Color.Red, Color.Blue, Color.BlueViolet, Color.Brown };
for(int c = 0,size = word.Length; c < size; c++) {
//search by color[x] and set line color to color[x]
//How I do this?
}
+2
a source to share
2 answers