Description
Use the wSelectionEnd
property to get the position of the last selected character in the text.
Declaration
TestObj.wSelection
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 last 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 wSelectionEnd
property of the TelerikMaskedEditBox
object may return an incorrect value.
See Also
Getting the Selected Text in an Edit Control
wSelection Property (Edit Controls)
wSelectionStart Property (Edit Controls)
wSelectionEnd Property (Specific to DevExpressMemoEdit, DevExpressTextEditand SilverlightTextBox Controls)