Dela via


TextBox.SelectionStart Property

Definition

Gets or sets the starting position of the text selected in the text box. When the SelectionLength is 0 (there is no selected text), the SelectionStart property corresponds to the cursor position.

public:
 property int SelectionStart { int get(); void set(int value); };
int SelectionStart();

void SelectionStart(int value);
public int SelectionStart { get; set; }
var int32 = textBox.selectionStart;
textBox.selectionStart = int32;
Public Property SelectionStart As Integer
<TextBox SelectionStart="int"/>

Property Value

Int32

int

The starting position of the current selection or the current cursor position.

Applies to