You can use the SelectionStart property to specify the first character to select in the range. Use the SelectionLength property to specify how many characters should be selected.
To write code in C#
C# |
Copy Code |
---|---|
private void button1_Click(object sender, EventArgs e) { C1Editor1.SelectionStart = 2; C1Editor1.SelectionLength = 6; } |
For example, the following code starts the selection after the second character in the C1Editor and continues until six characters are selected: