[Top]  [Chapter]  [Previous]  [Next]


int ActivateSyntaxHighlighter(int Mode; string param)


TextDynamic includes a versatile syntax highlighting interface.


It internally has the possibility to change the attributes of the text (i.e. apply color green for comments) or just add virtual marks.  In any case the visible attributes will be updated as the user types.


Currently available is syntax highlighting for XML, for fields and for field and band tokens.


Memo.ActivateSyntaxHighlighter( param, strparam) selects the internal Syntax Highlighting Mode.


param selects the mode:


0 - disables the highlighting,


1 - selects the HTML / XML highlighter. (Attributes are applied to the text)


2 - selects the HTML / XML highlighter. (Attributes are virtual, they are not applied to the text)


3 - highlight fields using the syntax <<...>> - see Mailmerge (Attributes are not applied)


4 - highlight fields and bands using the syntax <<...>> - see "Tokens to Template Conversion" (Attributes are not applied). To actually convert the tokes use TextCommandStr(17).





Modes 3 and 4 can be customized by passing a string parameter.


The string parameter has to consists of 2 or 4 lines (separated by CRNL)

1. Line = Startcode, default <<

2. Line = Endcode, default >>

3. Line = Bandcharacter, default :

4. Line = Groupcharacter, default #




[activatesyntaxhighlighter.htm]    Copyright © 2007 by WPCubed GmbH