我查手册,查不到这个两个属性的意思!
请知道的朋友帮忙解释一下好吗?谢谢!
这个是MSDN里的:
SelLength, SelStart, SelText
The SelLength property returns or sets the number of characters selected.
The SelStart property returns or sets the starting point of text selected; indicates the position of the insertion point if no text is selected.
The SelText property returns or sets the string containing the currently selected text; consists of a zero-length string ("") if no characters are selected.
Note These properties are not available at design time.
Syntax
object.SelLength [= number]
object.SelStart [= index]
object.SelText [= value]
The parts of the SelLength, SelStart, and SelText property syntaxes are described in the following table.
Part Description
object An object expression that evaluates to an object.
number A numeric expression specifying the number of characters selected. For SelLength and SelStart, the valid range of settings is 0 to text length — the total number of characters in the edit area of a ComboBox or TextBox control.
index A numeric expression specifying the starting point of the selected text, as described in Settings.
value A string expression containing the selected text.
Remarks
Use these properties for tasks such as setting the insertion point, establishing an insertion range, selecting substrings in a control, or clearing text. Used in conjunction with the Clipboard object, these properties are useful for copy, cut, and paste operations.
When working with these properties, remember that:
Setting SelLength less than 0 causes a run-time error.
Setting SelStart greater than the text length sets the property to the existing text length; changing SelStart changes the selection to an insertion point and sets SelLength to 0.
Setting SelText to a new value sets SelLength to 0 and replaces the selected text with the new string.
给你段中文的:
SelLength 返回或设置 Slider 控件中选择出的范围长度。
SelStart 返回或设置 Slider 控件中选择出的范围起点。
语法
object.SelLength [= value]
object.SelStart [= value]
SelLength 和 SelStart 属性的语法包含下面部分:
部分 描述
object 对象表达式,其值是 Slider 控件。
value Min 和 Max 属性中的数值。
说明
SelLength 和 SelStart 属性一起使用,可以在 Slider 控件上选择某一范围内的连续数值。于是,Slider 控件还具有进一步的优势,它可以在直观上模拟可能的取值范围。
SelLength 属性不能小于 0,SelLength 与 SelStart 之和不能大于 Max 属性。
给你段中文的:
SelLength 返回或设置 Slider 控件中选择出的范围长度。
SelStart 返回或设置 Slider 控件中选择出的范围起点。
语法
object.SelLength [= value]
object.SelStart [= value]
SelLength 和 SelStart 属性的语法包含下面部分:
部分 描述
object 对象表达式,其值是 Slider 控件。
value Min 和 Max 属性中的数值。
说明
SelLength 和 SelStart 属性一起使用,可以在 Slider 控件上选择某一范围内的连续数值。于是,Slider 控件还具有进一步的优势,它可以在直观上模拟可能的取值范围。
SelLength 属性不能小于 0,SelLength 与 SelStart 之和不能大于 Max 属性。
谢谢楼上的朋友!昨晚停电,所以没法上来看!充心感谢!