Board index » cppbuilder » TRichEdit - Syntax highlighting

TRichEdit - Syntax highlighting


2003-07-21 10:36:23 PM
cppbuilder16
Hi,
Does anybody has any example routines of how to do syntax highlighting in a
TRichEdit component. I would like to scan c++ type code (not c++ but
similar layout), and would like for it to highlight while typing and when
saving/loading a file.
I've tried different methods for doing this, but have found it rather hard.
i.e. some words being highlighted when they shouldn't be or ungihlighting
when cursoring through them. flickering of the component while typing.
taking a long time to set the colors on a document load/save etc...
If anyone has any ideas that would help, i'd be grateful.
Thanks in advance,
Woody.
 
 

Re:TRichEdit - Syntax highlighting

"Andrew Woodall" < XXXX@XXXXX.COM >wrote in message
Quote
Does anybody has any example routines of how
to do syntax highlighting in a TRichEdit component.
TRichEdit is not designed for syntax highlighting. Although possible, the
effect is very slow and not very accurate or effective at all. You would be
best off using a component that is specifically designed for syntax
highlighting, such as TSynEdit, synedit.sourceforge.net
Gambit
 

Re:TRichEdit - Syntax highlighting

Thanks Remy... that does the job perfectly... better than what I needed...
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Andrew Woodall" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>Does anybody has any example routines of how
>to do syntax highlighting in a TRichEdit component.

TRichEdit is not designed for syntax highlighting. Although possible, the
effect is very slow and not very accurate or effective at all. You would
be
best off using a component that is specifically designed for syntax
highlighting, such as TSynEdit, synedit.sourceforge.net


Gambit


 

{smallsort}