Description
Use the wSelectionStart
property to get the position of the first selected character in the text.
Declaration
TestObj.wSelectionStart
Read-Only Property | Integer |
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section |
Applies To
The property is applied to the following objects:
Java Swing Password Field, Java Swing TextArea, Java Swing TextField and 8 more objects, MFC Edit Browse, Oracle Forms Text Field, Qt LineEdit, Qt Text Edit, Telerik RadMaskedEditBox for WinForms, Telerik RadTextBox for WinForms, Win32 Edit, WPF TextBox « Collapse the list
View Mode
To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
Property Value
The index of the first selected character in the text.
If no text is selected, returns the position of the cursor in the control.
For Qt LineEdit, Qt TextEdit: If no text is selected, the property returns -1
.
Remarks
Note for Telerik RadControls for WinForms 2011.1 users: Due to malfunction of the Telerik MaskedEditBox control, the wSelectionStart
property of the TelerikMaskedEditBox
object may return an incorrect value.
See Also
Getting the Selected Text in an Edit Control
wSelection Property (Edit Controls)
wSelectionEnd Property (Edit Controls)
wSelectionStart Property (Specific to DevExpressMemoEdit, DevExpressTextEdit, JFXSwingTextField and SilverlightTextBox Controls)