S > Selection (object)
Selection (object)The Selection object allows you to set and control the currently focused editable text field. The currently focused editable text field is the field where the user's mouse pointer is currently placed. Selection-span indexes are zero-based (where the first position is 0, the second position is 1, and so on).
There is no constructor method for the Selection object, as there can only be one currently focused field at a time.
Returns the index at the beginning of selection span. Returns -1 if there is no index or currently selected field. Returns the current caret position in the currently focused selection span. Returns -1 if there is no caret position or currently focused selection span. Returns the index at the end of the selection span. Returns -1 if there is no index or currently selected field. Returns the name of the variable for currently focused editable text field. Returns null if there is no currently focused editable text field. Focuses the editable text field associated with the variable specified in the argument. Sets the beginning and ending indexes of the selection span.
Method summary for the Selection object
Method
Description
getBeginIndex
getCaretIndex
getEndIndex
getFocus
setFocus
setSelection