SetSelection()

Syntax:

textObject.SetSelection( Start, End )

Parameters:

StartStart should contain the index position of the character that marks the beginning of the selection. If Start is set to -1 then the selection is set to the last character’s index position i.e. the selection begins at the end of the current string. If Start is set to 0 then the selection is set before the first character’s index position i.e. the selection starts at the beginning of the current string. Start can be a number or a variable name containing a number. This parameter is required.

EndEnd should contain the index position of the character that marks the end of the selection. If End is set to -1 then the selection is set to the last character’s index position i.e. the selection ends at the end of the current string. End can be a number or a variable name containing a number. This parameter is optional.

Remarks:

Selects a range of characters in the named Text object. This function is necessary when you want to modify text within a Text object or query its current value. When Start equals End the selection is set for insertion. For a Text Input object, the selection will be visible as an inverted region, or a flashing cursor.

image\Script_Button.jpgExamples