ToolStripComboBox.SelectionStart 屬性

定義

取得或設定 ToolStripComboBox 中所選文字的起始索引。

public:
 property int SelectionStart { int get(); void set(int value); };
[System.ComponentModel.Browsable(false)]
public int SelectionStart { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.SelectionStart : int with get, set
Public Property SelectionStart As Integer

屬性值

Int32

在目前文字選取的字串中第一個字元之以零為起始的索引。

屬性

備註

如果控制項中未選取任何文字,這個屬性會指出新文字的插入點。 如果您將此屬性設定為超出控制項中文字長度的位置,則選取範圍開始位置會放在最後一個字元之後。 在文字方塊控制項中選取文字時,變更此屬性可能會釋放 屬性的值 SelectionLength 。 如果 屬性所指示 SelectionStart 的位置之後控制項中的剩餘文字小於 屬性的值 SelectionLength ,則屬性的值 SelectionLength 會自動減少。 屬性的值 SelectionStart 永遠不會造成 屬性增加 SelectionLength

適用於