Table of contents
TOC
折叠目录
展开目录

SelStart 属性SelStart Property

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

如果未不选择任何文本,表示选定文本的起始点或者插入点。语法对象SelStart[=]SelStart属性语法具有下列组成部分:Indicates the starting point of selected text, or the insertion point if no text is selected. Syntaxobject. SelStart [= Long ] The SelStart property syntax has these parts:

部件Part说明Description
objectobject(所需)。对象有效。Required. A valid object.
LongLong可选。数值表达式,指定选定文本的起始点。对于SelLengthSelStart设置的有效范围是 0 到组合框文本框的编辑区域中的字符总数。默认值为零。Optional. A numeric expression specifying the starting point of text selected. For SelLength and SelStart, the valid range of settings is 0 to the total number of characters in the edit area of a ComboBox or TextBox. The default value is zero.

备注SelStart属性是始终有效,即使该控件不具有焦点。将SelStart设置为小于零的值创建一个错误。正在尝试将SelStart属性设置为的值大于可用结果的值等于控件中的字符数的字符数。更改值的SelStart取消任何现有内容控件中的,将插入点放在文本中,并将SelLength属性设置为零。Remarks The SelStart property is always valid, even when the control does not havefocus. Setting SelStart to a value less than zero creates an error. Attempting to set SelStart to a value greater than the number of characters available in a control results in a value equal to the number of characters in the control. Changing the value of SelStart cancels any existing selection in the control, places an insertion point in the text, and sets the SelLength property to zero.

© 2018 Microsoft