SetCodeText Method

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

Applies to

IWPCharacterAttr

Declaration

procedure SetCodeText(Select: Integer; const Text: WideString);

Description

To change the text which is displayed by start and end markers You can use the method SetCodeText. Use first parameter =1 to change start marker, 2 to change end marker. The string may contain placeholders: "%N" displays the name, "%S" displays the Source property of the text object, "%Y" displays the name of the style used by this object, "%P" displays the Params property.


SetCodeText Example

wpdllInt1.TextCursor.InputField("NAME","WPCubed GmbH",false);   wpdllInt1.SpecialTextAttr(SpecialTextSel.wpInsertpoints).SetCodeText(1,"%N(");            wpdllInt1.SpecialTextAttr(SpecialTextSel.wpInsertpoints).SetCodeText(2,")");

 


[idh_iwpcharacterattr_setcodetext.htm]    Copyright © 2007 by WPCubed GmbH