SetSel - DfBaseForm
Selects text in given position range
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iPositionStart | Integer | The starting position of the text |
| iPositionEnd | Integer | The ending position of the text |
Syntax
Procedure SetSel Integer iPositionStart Integer iPositionEnd
Call Example
Send SetSel iPositionStart iPositionEnd
Description
Selects text in control in given position range.
Selects text from character immediately after position iPositionStart to character in the position iPositionEnd.
If iPositionStart is equal to iPositionEnd, the selection range is empty, so caret will be placed immediately after position iPositionStart. If iPositionStart is equal to 0, and iPositionEnd is -1, the entire text is selected.
The character position is the zero-based absolute position of the character in the control. The first position in the first line is always 0. If the first line in the control contains 20 characters, the first position in the second line will be 20.
This method has no effect if control is not paged.
Sample
This sample selects (highlights) the text in control oForm1.
Procedure DoSearch
Integer iSelStart iSelEnd
Move 0 to iSelStart
Move 20 to iSelEnd
Send SetSel of oForm1 iSelStart iSelEnd
End_Procedure
See Also