Edit.setSelectionStart

Overview | Methods | This Package | All Packages

Edit.setSelectionStart

Sets the starting position of the text selection in the edit control.

Syntax

public final void setSelectionStart( int value )

Parameters

value

The zero-based index of the first character to include in the text selection in the edit control. For example, to select the third through fifth characters in the edit control (with zero-based indexes 2 through 4), set this value to 2, and set the value parameter of the setSelectionEnd method to 5. To place the cursor in the edit control without selecting text, specify the same value for both the getSelectionStart method and the getSelectionEnd method. For example, to place the cursor between the third and fourth characters, pass the value 3 to both methods.

See Also   getSelectionStart