version 3
HIGHLIGHT TEXT (area; startSel; endSel)
Parameter | Type | Description | |
area | Field | Variable | Enterable field or variable | |
startSel | Number | New text selection starting position | |
endSel | Number | New 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