SetSelRange Method (TextField)

Class

TextField.

Action

Selects the specified range of the single-line or multi-line text field.

Syntax

textfield.SetSelRange (iStartLine, iStartCol, iEndLine, iEndCol)
Variable Description
iStartLine The line at which to start the selection. INTEGER.
iStartCol The column at which to start the selection. iStarCol includes the given parameter value. INTEGER.
iEndLine The line at which to end the selection. INTEGER.
iEndCol The column at which to end the selection. iEndCol excludes the given parameter value. INTEGER.

Notes

SetSelRange selects the specified area, starting at the position specified by iStartLine and iStartCol, and ending with the position specified by iEndLine and iEndCol. The area is selected as if you interactively placed the cursor at the beginning position, held down the Shift key, and clicked the cursor at the end position.

The values of the column arguments point to just before the columns themselves. Therefore, position 1 is the position just before the first character. The position at the end of the line is one less than the last character.

For a single-line text field, iStartLine and iEndLine are ignored.

Example

TextEditor.Document.SetSelRange (1, 1, 4, 6)