If the current output window contains an active edit field, this statement selects (highlights) a range of text in the field, or sets the position of the blinking insertion point. It also scrolls the selected text into view, if it's not already in view.
endSelect% parameters refer to positions between characters in the field. Position 0 is just to the left of the first character; position 1 is between the first and second characters; and so on. If you specify a position greater than or equal to the number of characters in the field, it indicates a position just to the right of the last character. If
endSelect%, then no text is highlighted, but a blinking insertion point is paced at the indicated position.
If you specify
SetSelect 0,0, a blinking insertion point is placed at the beginning of the field's text. If you specify
SetSelect 0,32767, all of the text in the field is selected. If you specify
SetSelect 32767,32767, a blinking insertion point is placed at the end of the field's text.
The following inserts or replaces the selected range with the contents of
SetSelect startSelect%, endSelect%
tekey$ = newPascalString
Text selection and insertion-pont placement are normally handled automatically by the
HandleEvents statement, in response to the user's mouse and keyboard actions. Use
SetSelect for special situations.
window(_selEnd) functions to determine the active field's current selection range.
edit field; tekey$ statement; window function