CodeEditor.SelectionStart Property

Applies to TestComplete 15.44, last modified on November 10, 2022

Description

Use the CodeEditor.SelectionStart property to get the position of the first selected character in the currently active Code Editor instance. To get the position of the last selected character, use the SelectionEnd property. To obtain the selected text, use the SelectedText property.

Declaration

CodeEditor.SelectionStart

Read-Only Property Integer

Applies To

The property is applied to the following object:

Property Value

A zero-based integer number that specifies the position of the first 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 SelectionStart property raises an error. To check if there is an active Code Editor, use the IsEditorActive property.

See Also

SelectionEnd Property
SelectedText Property
CursorPos Property
Text Property
Working With the Code Editor

Highlight search results