Is there a method to uncheck a checkbox in a wx.CheckListBox as I need to implement an "uncheck all" button, can't seem to find anything... although there is number of methods for setting a checkbox/s.
+1
A:
There is an optional "check" argument for Check() - see http://docs.wxwidgets.org/stable/wx_wxchecklistbox.html#wxchecklistboxcheck
Example: clb.Check(itemnum, check=False)
Jeremy Brown
2010-07-13 20:43:25
damn!! totally missed that.. thanks again
volting
2010-07-13 20:58:44
A:
Use void wxCheckListBox::Check Check(int item, bool check = true) to do the unchecking of each of the items. The item count should be available through the unsigned int wxControlWithItems::GetCount GetCount() const method (wxCheckListBox is derived from wxControlWithItems).
roguenut
2010-07-13 20:43:58
+2
A:
Try this:
for cb in mycblist.Checked:
mycblist.Check(cb, False)
Wayne Werner
2010-07-13 20:44:51
Same as jermeys solution who answered first so I marked his as the accepted... +1 Thanks all the same though
volting
2010-07-13 21:01:08
ninja'd! I always hate it when that happens... thanks for the upvote though!
Wayne Werner
2010-07-13 23:01:24