Articles in this section
Category / Section

How to programmatically select the text in SyntaxEditor (EditControl)?

1 min read

Select the text

The SetSelection method is a single API to specify the bounds of the text to be selected.

The SelectAll method can be used to select all the text in the EditControl.

The SelectedText property returns the currently selected text in the EditControl.

Please refer to the following code snippets for more details.

C#

this.editControl1.SetSelection (startColumn, startLine, endColumn, endLine);
this.editControl1.SelectAll();
string editText = this.editControl1.SelectedText;

 

VB

Me.editControl1.SetSelection (startColumn, startLine, endColumn, endLine)
Me.editControl1.SelectAll()
Dim editText as String = Me.editControl1.SelectedText

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied