Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you handle multiple selection in a drop down style control?

I have a WinForms application with a view where the user selects a single time span from a list of predefined time spans in a ComboBox, with it's DropDownStyle property set to DropDownList.

Now, the requirements have changed. The users are going to need the ability to make multiple selections from the list of time spans.

Is it possible to make multiple selections in a ComboBox? How do you present those choices when the ComboBox is collapsed? Don't forget the usability aspect.

Does some other control exist (built in or 3rd party, preferrably a drop down of some sort) that can provide for my users needs?

Update: Misleading title...

like image 508
Christoffer Lette Avatar asked Oct 03 '08 11:10

Christoffer Lette


2 Answers

I agree with @Thomas Owens on the usability aspect. If you are selecting multiple items then the user should be able to see all of the items that are selected. Maybe a checked list box will work for this.

If you still have you heart set on using a drop down type of control take a look at the DevExpress editors toolkit. I have just looked through their demo and there is a control called a PopupContainerEdit that will allow you to pop up a list of items with checkboxes. When the popup collapses you could always show the items as a coma delimited list. (though this may be unusable if the list is longer than the box)

like image 173
FryHard Avatar answered Oct 03 '22 07:10

FryHard


Even if it is possible, I would suggest changing the input type. When I see a drop-down box, I think that I must pick one. The ability to (and even how to) pick multiple options might elude your user. A standard list box might be more appropriate, from a usability standpoint.

like image 44
Thomas Owens Avatar answered Oct 03 '22 08:10

Thomas Owens