Wassup. I'm writing an application for web development. I have run into an issue and can't seem to overcome it. I have a button within the application that upon being clicked, will create a new tab that contains a rich text box. This new tab can then be used to edit existing files, or save new files.

My problem is this; is there a way I can check for specific words in each text box in every tab and then change that words colour? For example, if the sentence int a = 2; is typed, is there a way to change the colour of only the word int and the number 2?

All responses are welcome!

Have you tried anything yet? This might point you in the right direction Click Here You need to loop all the tabpages and their richTextBoxes. If you want to change only "int" and "2" in the string "int a = 2" you will probably need to use something like regex to only find "int" preceding an "a" and a "2" succeeding an "=" character.

Ah okay thanks, I have an idea on what to do now. I'll give it a try and see what happens! :)

Hey! So I had a look at the site that you posted, it is a very useful source of information, however it is not quite for my needs. I need something that will loop through without an onClick event. Something that will always be searching for the specified text without a form button to be pressed, any ideas?

You will to decide when to call the check method or you might need to use a timer and assign the appropriate interval.