System.Windows.Forms.ListBox.SelectionMode Property

Gets or sets the method in which items are selected in the System.Windows.Forms.ListBox.

Syntax

[System.ComponentModel.DefaultValue(System.Windows.Forms.SelectionMode.One)]
public virtual SelectionMode SelectionMode { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ListBox.SelectionMode property enables you to determine how many items in the System.Windows.Forms.ListBox a user can select at one time and how the user can make multiple-selections. When the ListBox.SelectionMode property is set to SelectionMode.MultiExtended, pressing SHIFT and clicking the mouse or pressing SHIFT and one of the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW) extends the selection from the previously selected item to the current item. Pressing CTRL and clicking the mouse selects or deselects an item in the list. When the property is set to SelectionMode.MultiSimple, a mouse click or pressing the SPACEBAR selects or deselects an item in the list.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0