ComboBox.getSelectionStart

Overview | Methods | This Package | All Packages

ComboBox.getSelectionStart

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

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 of the combo box. 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. If the edit control does not have the focus, this method returns zero (0). If the combo box has a static text control instead of an edit control, this method returns -1.

See Also   setSelectionStart