語言

TextBox.SelectionStart 屬性

定義

取得或設定文字框中所選文字的起始位置。 當 SelectionLength 為 0(沒有選取的文字)時,SelectionStart 屬性對應游標位置。

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"/>

屬性值

Int32

int

目前選擇的起始位置或游標位置。

適用於