Click to See Complete Forum and Search --> : HELP: Checking Text for Syntax-Colors


CMichael
January 24th, 2000, 07:06 AM
I've made a HTML-Editor in VB using the RichTextEditBox.

Now I want to colour the tags etc..
E.g. tag and name in blue, tagsubtypes in red and stringvalues in green (it's only an example!).

How to do that running very fastly?
Normaly it's too slow (on big files... take a nap...).


Does someone know how'to manage that?

Thanks!

Chris Eastwood
January 24th, 2000, 07:44 AM
Have you tried the code from the CodeGuru site at http://codeguru.developer.com/vb/articles/1739.shtml ?

Failing that, you'll probably have to rewrite your code-colouring routines in C++ (I had to for my own program and it's about 10-20X faster in C++).

There's examples of Syntax Highlighting available on the MFC codeguru site under the rich edit control (http://codeguru.developer.com/richedit/index.shtml).

Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb