CT SET HIGHLIGHT

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

version 1


CT SET HIGHLIGHT (area; scope; first; last)

ParameterTypeDescription
areaLongint4D Chart area
scopeLongint-1 = First object in a document
0 = First object in selection
>0 = Object ID
firstIntegerPosition of first character minus 1
lastIntegerPosition of last character

Description

The CT SET HIGHLIGHT command highlights characters within the text object in area described by scope.

If scope equals -1, CT SET HIGHLIGHT highlights characters in the first object of the document.

If scope equals 0, CT SET HIGHLIGHT highlights characters in the first selected object.

If scope is greater than 0, it must be equal to a specific text object's ID and characters within that text object are highlighted. If the object does not exist, CT SET HIGHLIGHT does nothing. CT SET HIGHLIGHT causes the object described by scope to become the only object selected in area.

If the object described by scope is not a text object, CT SET HIGHLIGHT does nothing.

first and last determine which characters are highlighted. first is one less than the first character position to be highlighted. last is the last character position to be highlighted. If first equals last, no characters are selected and the insertion point is between first and first +1. If last is greater than the number of characters in the text object, CT SET HIGHLIGHT highlights characters to the end of the text object.

CT SET HIGHLIGHT does not highlight only part of a reference. If any portion of a reference is highlighted, CT SET HIGHLIGHT adjusts the highlight to include the entire reference.

Example

This example gets the text of the selected text object and looks for the name "4th Dimension". If "4th Dimension" is found, it is highlighted and then made bold.

   $Find := Position ("4th Dimension";$Text)
   If ($Find # 0)
      CT SET HIGHLIGHT (Area;0;$Find - 1;$Find + 12)
      CT SET TEXT ATTRIBUTES (Area;-3;-1;-1;1;-1;-1)
   End if

See Also

CT GET HIGHLIGHT.


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