Description
Use the CodeEditor.SelectionEnd
property to get the position of the last selected character in the currently active Code Editor instance. To get the position of the first selected character, use the SelectionStart
property. To obtain the selected text, use the SelectedText
property.
Declaration
Applies To
The property is applied to the following object:
Property Value
A zero-based integer number that specifies the position of the last selected character within the Code Editor’s text.
If text is not selected in the Code Editor, both SelectionStart
and SelectionEnd
properties return the insertion point position, that is, the same value as CursorPos
.
Remarks
If the Code Editor is not active in the TestComplete Workspace panel, the SelectionEnd
property raises an error. To check if there is an active Code Editor, use the IsEditorActive
property.
See Also
CodeEditor.SelectionStart Property
CodeEditor.SelectedText Property
CodeEditor.CursorPos Property
CodeEditor.Text Property
Working With the Code Editor