ToolStripTextBox.SelectionLength 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置在 . 中选择 ToolStripTextBox的字符数。
public:
property int SelectionLength { int get(); void set(int value); };
[System.ComponentModel.Browsable(false)]
public int SelectionLength { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.SelectionLength : int with get, set
Public Property SelectionLength As Integer
属性值
在 . 中选择 ToolStripTextBox的字符数。
- 属性
注解
可以使用此属性来确定在对所选文本执行操作之前,文本框控件中当前是否选择了任何字符。 当属性值SelectionLength设置为大于控件文本中的字符数的值时,该属性的值SelectionLength将设置为控件中文本的整个长度减去属性的值(如果为SelectionStart属性指定任何值SelectionStart)。
注释
可以通过将 SelectionStart 插入点移动到 SelectionLength 的文本框内的位置设置为零(0)的值,以编程方式移动文本框内的插入点。 文本框必须具有焦点才能移动插入符号。