Checklist Box ?

tehon3299

Well-known member
Joined
Jan 6, 2003
Messages
155
Location
Liverpool, NY
I have a checklist box of about 9 items and I was wondering how I would go through that list for checkboxes and uncheck them all?? Anyone?
 
There are different ways, but a simple way would be to loop through the control collection of the parent container that holds these checkboxes and uncheck each one.
C#:
foreach(Control c in container.Controls)
{
   if(c is CheckBox)
     ((Checkbox)c).Checked = false;
}

EDIT: O, and if you meant a listbox with checkboxes then see this thread:
http://www.computerhelp.forum/showthread.php?s=&threadid=70810
 
Last edited by a moderator:
Back
Top