Page 1 of 1
Syntax highlight emulation.
Posted: Fri Feb 10, 2006 9:18 pm
by Denoson
Is there any way for Syntax highlight emulation?
Scan RvData and change styles...
Posted: Sun Feb 12, 2006 3:29 pm
by Sergey Tkachenko
Do you need a realtime syntax highlight?
See TSyntaxRichViewEdit on
http://www.trichview.com/resources/ . It is quite a basic and slow component, so it can be used for very simple highligting in relatively small documents.
Or do you want to display a preformatted highlighting?
syntax highlight
Posted: Sun Feb 12, 2006 6:52 pm
by Denoson
I know TSyntaxRichViewEdit but I don't need realtime syntax highlighting.
I want to create special button "Pascal highlight" or "HTML highlight" and reformat existing text (or selection).
Posted: Sun Feb 12, 2006 9:15 pm
by Sergey Tkachenko
I think the simplest way is to read the selected text, then to add it to a hidden RichView (using normal AddNL methods) using proper styles for keywords. Then save data to stream (SaveRVFToStream) and insert it back (InsertRVFFromStreamEd)
Posted: Mon Feb 13, 2006 7:56 am
by Denoson
Thanks, I try to use this method.