語言

ToolStripComboBox.SelectedIndex 屬性

定義

取得或設定指定當前選取項目的索引。

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

屬性值

一個以零為基礎的索引,指目前所選項目。 若未選取項目,則回傳負一(-1)值。

屬性

備註

此特性表示組合框列表中目前選取項目的零基索引。 設定新的指數會提升事件。SelectedIndexChanged

註 要取消選取的項目,請將 設定 SelectedIndex 為 -1。

適用於