I am using the CheckListCtrlMixin to let a user enable and disable plugins for my application. I would like to update my internal model as soon as the user checks/unchecks an item in the list. What event is emitted by the CheckListCtrlMixin when an item is checked?
class CheckListCtrl(wx.ListCtrl,
CheckListCtrlMixin, ListCtrlAutoWidthMixin):
def __init__(self, parent):
wx.ListCtrl.__init__(self, parent, -1,
style=wx.LC_REPORT | wx.SUNKEN_BORDER)
CheckListCtrlMixin.__init__(self)
ListCtrlAutoWidthMixin.__init__(self)
Neither of the following emit when an item is checked or unchecked:
self.pluginlist = CheckListCtrl(win)
... add a bunch of items to the list ...
self.pluginlist.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_item_activated)
self.pluginlist.Bind(wx.EVT_LIST_ITEM_SELECTED, self.on_item_selected)
CheckListCtrlMixindoes not emit an event for un/checking an item. Instead, it calls the overridable method:To ‘bind’ the ‘event’ outside your
CheckListCtrlclass, you can use: