TextBox.SelectionStart 属性

定义

获取或设置当前选定内容的开头的字符索引。

public:
 property int SelectionStart { int get(); void set(int value); };
public int SelectionStart { get; set; }
member this.SelectionStart : int with get, set
Public Property SelectionStart As Integer

属性值

当前所选内容的开头的字符索引。

例外

注解

如果指定的选择长度会导致选择在回车符和新行字符之间结束,则选择长度会自动增加 1,以便生成的选择跨越整个行尾标记。

适用于

另请参阅