Change color of text written in richtextbox

Possible duplicate:
How are colored words in RichTextBox with different colors?

I want to change the color of the text written in the richtextbox after the curly braces ({..}), i.e. if I write the code in curly braces then it should be displayed in red. Plz will suggest me the code for this.

+2


a source to share


1 answer


So it looks like something akin to syntax highlighting ...
You can see here for some tips

Basically you need to use RichTextBox TextChanged Event, then reg expressions to find the interesting piece of text, select it and color ...



There's also an interesting post here saying that

0


a source







All Articles