CT GET HIGHLIGHT

4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next

version 1


CT GET HIGHLIGHT (area; first; last)

ParameterTypeDescription
areaLongint4D Chart area
firstIntegerReceives position of first character minus 1
lastIntegerReceives position of last character

Description

The CT GET HIGHLIGHT command returns into the first and last variables the character positions of the highlighted text in area.

first is one less than the first character position highlighted and last is the last character highlighted. If first equals last, no characters are highlighted and the insertion point is between first and first +1.

Since only one object can have highlighted text at a time, the scope parameter is not needed. If there is no highlighted text in area, CT GET HIGHLIGHT returns -32000 for first and last.

Example

This example returns the position of the highlighted text, and if no text is selected, it alerts the user.

   CT GET HIGHLIGHT (Area;$First;$Last)
   If (CT Error = 46)
      ALERT ("There is no text highlighted.")
   End if

See Also

CT SET HIGHLIGHT.


4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next