[]
Specifies how a list box allows item selection.
Use this enum with a list box control to determine whether users can select one item, multiple items without modifier keys, or multiple items by using the Ctrl key. The available modes correspond to the list box selection modes used by Excel VBA.
public enum SelectionMode
Public Enum SelectionMode
IListBox listBox = worksheet.Controls.AddListBox(24.1, 273.1, 170, 78.69);
listBox.Items.Add(new ListBoxItem("Item 1"));
listBox.Items.Add(new ListBoxItem("Item 2"));
listBox.Items.Add(new ListBoxItem("Item 3"));
listBox.SelectionMode = SelectionMode.Extended;
| Name | Description |
|---|---|
| Extended | Select multiple items with ctrl key in the list box. |
| Multiple | Select multiple items in the list box. |
| Single | Select single item in the list box. |