10
Reply

richTextbox change colors for words

Ask a question
Janis Peksa

Janis Peksa

13y
6.1k
1
Hello, I have a code thats changes colors for special words and sets brackets for sql query.
But I have problem whan I press button it's makes all text blue.
I type a same code in richtextbox like this: "select aaa from bbb where a=1 or a=2 or a=3 and b=2 or b=3 and c=2 or c=3". It's make words colored like 'select, from, where, and, or to' color blue.
Can someone tell me why it's color all text blue after I press button and program adds brackets ?
Here is my code:
http://paste.php.lv/7cd1b3da1717783542b2a414d73a1e30?lang=csharp

Answers (10)