DR GET HIGHLIGHT

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

version 6.0


DR GET HIGHLIGHT (area; first; last)

ParameterTypeDescription
areaLongint4D Draw area
firstLongintPosition of first character minus 1
lastLongintPosition of last character

Description

The command DR GET HIGHLIGHT 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.

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

Example

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

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

See Also

DR SET HIGHLIGHT.


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