skip to Main Content
tel.: 0049-89-49053501 support@wptools.de

Syntax Highlighting

The component TWPSynEditHighlight has been created to use the SynEdit (http://SynEdit.SourceForge.net) syntax highlighter with WPTools. This makes it possible to show the syntax of about 30 different languages, including pascal, Java c++ and SQL!

All you need to add the syntax highlighter units to the project. Then you can select a highlighter with

procedure TWPSyntaxHigh.HighlighterNameChange(Sender: TObject);
 begin
 if WPSynEditHighlight1.SelectLanguage( HighlighterName.Text ) then
 begin
 WPSynEditHighlight1.Execute(WPRichText1.FirstPar);
 WPSynEditHighlight1.Enabled := FALSE;
 WPRichText1.ReformatAll(true, true);
WPSynEditHighlight1.Enabled := TRUE;
 end;
 WPRichText1.SetFocus;
end;

Non destructive highlighting
WPTools also includes non destructive syntax highlighting for merge field tokens, reporting tokens (such as bands and groups) and XML.

Back To Top