PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

SelectionStart

TextBox

int

Determines the starting position of a text selection, or -1 if the TextBox has no range of selected text. If the value is -1 or equivalent to TextBox/CursorPosition|CursorPosition, there is no range of text selected. This property uses the same positioning logic as CursorPosition. SelectionStart will be greater than CursorPosition if the cursor is at the beginning of a selection, and less than CursorPosition if the cursor is at the end.


Code Samples


TextBox Selections

This code sample demonstrates reading the current selection of a TextBox using TextBox/CursorPosition|CursorPosition and TextBox/SelectionStart|SelectionStart.