Select Method


8.7C, PLBCMP GUI Only

 

The Select method highlights a range of characters in an EDITTEXT, EDITNUMBER, or RICHEDITTEXT or sets the current caret position. The method uses the following format:

 

 

[label]

{object}.Select

[GIVING {return}]:

 

 

 

USING [*Start=]{start},[*End=]{end}

 

Where:

label

Optional. A Program Execution Label.

object

Required. An EDITTEXT, EDITNUMBER or RICHEDITTEXT object that is accessed.

return

Optional. A Numeric Variable that indicates the success of the method.

start

Optional. A decimal number or Numeric Variable that specifies a caret or selection point before the starting character position.

end

Optional. A decimal number or Numeric Variable that specifies the ending selection point before the ending character position.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. Upon completion, {return} will always contain a one (1) to indicate success.

  2. The OVER and EOS Condition Flags are always cleared.

  3. The first character position is at one (1).

  4. If an end position of zero (0) is given, the selection goes from the {start} position and selects all of the remaining data. The caret position is left after the {end} position.

  5. If the {start} and {end} positions are the same, the caret position is set before the {start} position and no data is highlighted as a selection.

  6. If the {start} position has a value larger than the number of characters in the edit object, the caret is after the last character in the object.

  7. If the {start} value is set to one and the {end} value is set to five (5), the first four characters are highlighted as a selection. The caret is set before the fifth character and the fifth character is not selected.

  8. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

 

 

See Also: Method Syntax, EDITTEXT Methods, EDITNUMBER Methods, RICHEDITTEXT Methods

 



PL/B Language Reference ScrollToCaret Method SelectAll Method