Breyta

Deila með


ToolStripComboBox.SelectedIndex Property

Definition

Gets or sets the index specifying the currently selected item.

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

Property Value

A zero-based index of the currently selected item. A value of negative one (-1) is returned if no item is selected.

Attributes

Remarks

This property indicates the zero-based index of the currently selected item in the combo box list. Setting a new index raises the SelectedIndexChanged event.

Note To deselect the currently selected item, set the SelectedIndex to -1.

Applies to