• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

CheckedListBox - several items - One check box - vb.net

Is there a way to add several items to a checkedListBox control during runtime, with only 1 checkbox near them? Lets say I have 3 items inside my checked list box, But I don't want a check box for each item, instead I would like to put a check box for ALL 3 items.

is this possible?

2 Solutions
With CheckedListBox it is not possible. To create custom control.... possible, but will require some time to be done. From the first thought, it would be a collection of labels, where some of them will have checkbox control associated with it, and some dont. Implementing scrollbars will take most of the time to make it

Mike TomlinsonMiddle School Assistant TeacherCommented:
You could code it so that when one of the "related" items is checked/unchecked they all get checked/unchecked together.

Going with that similar train of thought, you could use a TreeView with CheckBoxes enabled and check/uncheck all children/siblings at the same time.  At least with a TreeView there would be a visual grouping of the items because of the Tree hierarchy.

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now