views:

36

answers:

3

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
damn!! totally missed that.. thanks again
volting
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
+2  A: 

Try this:

for cb in mycblist.Checked:
   mycblist.Check(cb, False)
Wayne Werner
Same as jermeys solution who answered first so I marked his as the accepted... +1 Thanks all the same though
volting
ninja'd! I always hate it when that happens... thanks for the upvote though!
Wayne Werner