ComboBox with checkbox items
Solution 1
We have used the following components in our different projects:
Freeware:
-
TjvCheckedComboBox
from JEDI VCL -
TCheckedComboBox
by Tsourinakis Antonis
Commercial:
-
TcxCheckComboBox
from DevExpress
Solution 2
You can write your own component
You can simulate the checkboxes using stock TComboBox in OwnerDraw mode and drawing both item titles and checkboxes by your custom routine
You can simulate the checkboxes using stock TComboBox using UNICODE symbols for checkboxes: http://en.wikipedia.org/wiki/Checkbox#Unicode
You can avoid using TCombobox but instead put TCheckList over some kind of collapsible panel with caption. Those components together might provide user experience rather close to checked combobox
-
You can take any of many ready-made components and libraries. For example
Combobox that shows a checkboxlist when expanded. Several options can be selected there, selected lines are shown as comma-separated-text in combobox. Access via properties "ItemEnabled[i]" and "Checked[i]"
PS. I used D2009 and that is an ultimately buggy Delphi version, both IDE and compiler and RTL. I seriously suggest you to either upgrade or downgrade.
PPS. You question is very very close to the "list the libraries" one, which is offtopic on StackOverflow: https://stackoverflow.com/help/dont-ask
Alec
I love code, everything that has to do with code...I love it
Updated on June 04, 2022Comments
-
Alec almost 2 years
Please advise, I'm still very new to Delphi. I would like to have a ComboBox with checkbox items, what can I use or do? I'm using Delphi 2009.
-
Arioch 'The over 10 yearswiki.delphi-jedi.org/wiki/JVCL_Help:TJvCheckedComboBox Combobox that shows a checkboxlist when expanded. Several options can be selected there, selected lines are shown as comma-separated-text in combobox. Access via properties "ItemEnabled[i]" and "Checked[i]"
-
Marcus Adams over 10 yearsA combobox doesn't have checkbox items. If you explain what you're using it for, maybe we can suggest a more natural/intuitive design.
-
Alec over 10 yearsThanks, the TJvCheckedComboBox is what I just need.
-
mistertodd over 9 years@MarcusAdams When you combine a Windows
Edit
control with aListBox
control, you get the standardDropDown
control. We want to combine a WindowsEdit
control with aChecked ListBox
control. For an example of this, open Windows Explorer and click the drop-down arrow on the right side of any header column. Blango! Drop-down+checkable items.
-
-
TLama over 10 yearsAd 2. and 3., I don't think it would be easy for implementation. Consider how would you control such owner drawn check boxes. Don't forget that if you click the drop down list, the item under the cursor is selected and drop down list hidden. That would be very uncomfortable for check list box. Ad Delphi 2009, except serious problems with generics I cannot say anything wrong about it. Nothing can be worse than Delphi 2005 :-)
-
Arioch 'The over 10 years@TLama the question was not "suggest me easy library" but a "what can i do" (if you disagree - flag the question as offtopic). Also i think you're wrong. #3 is the most easy to do (the most flatten learning curve - nothing to learn at all) // D2009 also has a lot of troubles debugging multithreaded apps. I did not use D2005, but i saw D2006. It was a poor choice as well. But they say D2007 was a decent release.
-
TLama over 10 yearsSo then tell me how do you check e.g. 3 items in such combo check list box, if you just draw icons. You will popup the drop down list three times ? Uhm, quite user unfriendly, I'd say. And, you're lucky you haven't met D2005 :-)
-
Arioch 'The over 10 years@TLama hey, you told "easy for implementation" above! Don't switch subject to "ease of use" and "GUI Guidelines" - we don't have them neither in the question nor in your starting comment. // Well, actually i avoided all those new versions for serious work until XE2. Before that i was stuck with D5 release :-D. Short affair with D2009 only proved me i was right :-)
-
TLama over 10 yearsSorry, surely I meant easy to implement an easy to use check list combo box.
-
mistertodd over 9 years@TLama If you want to see a checked drop-down list in action: open Windows Explorer. On the right side of each listview header column is a checked drop-down. That is the behaviour the user intuitively expects.
-
TLama over 9 years@Ian, thanks! Didn't know about it (I'm not using Windows Explorer).