Edit.getSelectionStart

Overview | Methods | This Package | All Packages

Edit.getSelectionStart

Retrieves the zero-based index of the first character in the current text selection in the edit control.

Syntax

public final int getSelectionStart()

Return Value

Returns the zero-based index of the first character in the current text selection in the edit control. For example, if the third through fifth characters are selected in the edit control (with zero-based indexes 2 through 4), the getSelectionStart method returns 2. If the cursor is in the edit control but no text is selected, both the getSelectionStart method and the getSelectionEnd method return the same value. For example, if the cursor is between the third and fourth characters, both methods return 3.

See Also   setSelectionStart