HIGHLIGHT TEXT

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


HIGHLIGHT TEXT (area; startSel; endSel)

ParameterTypeDescription
areaField | VariableEnterable field or variable
startSelNumberNew text selection starting position
endSelNumberNew text selection ending position

Description

The HIGHLIGHT TEXT command highlights a section of the text in area.

If area is not the object currently being edited, the focus is then set to this area.

Note: This command cannot be used with fields in the List form of a subform.

startSel is the first character position to be highlighted, and lastSel is the last character plus one to be highlighted. If startSel and lastSel are equal, the insertion point is positioned before the character specified by startSel, and no characters are highlighted.

If lastSel is greater than the number of characters in area, then all characters between startSel and the end of the text are highlighted.

Examples

1. The following example selects all the characters of the enterable field [Products]Comments:

   HIGHLIGHT TEXT([Products]Comments;1;Length([Products]Comments)+1)

2. The following example moves the insertion point to the beginning of the enterable field [Products]Comments:

   HIGHLIGHT TEXT([Products]Comments;1;1)

3. The following example moves the insertion point to the end of the enterable field [Products]Comments:

   $vLen:=Length([Products]Comments)+1
   HIGHLIGHT TEXT([Products]Comments;$vLen;$vLen)

4. See example for the command FILTER KEYSTROKE.

See Also

GET HIGHLIGHT.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next