#961 – A ListBox Has Three Available Selection Modes

By default, a user can select one item at a time in a ListBox.

961-001

You can use the SelectionMode property of the ListBox to allow the user to select multiple items.  By default, the SelectionMode property has a value of SelectionMode.Single, allowing the user to select a single item.

You can set SelectionMode to Extended, allowing a user to select multiple items, as follows:

  • A mouse left-click selects a single new item, unselecting all previously selected items
  • Control + left-click selects/unselects an additional item.  Previously selected items remain selected.
  • Shift + left-click selects all items between the most recently selected item and the one being clicked (inclusive).  Previously selected items not in this range are unselected.
  • Control + Shift + left-click selects all items within a range without unselecting previously selected items

961-002

Setting SelectionMode to Multiple allows selecting multiple items by left-clicking:

  • Left-clicking an item selects or unselects the item
Advertisements

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #961 – A ListBox Has Three Available Selection Modes

  1. Pingback: Dew Drop – December 2, 2013 (#1674) | Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: