Why not bind your list_param
to a wx.EVT_CHECKLISTBOX
event, which unchecks All
in case anything else is checked, like this?
self.Bind(wx.EVT_CHECKLISTBOX, self.check_list_param, self.list_param)
def check_list_param(self, evt):
checked = self.list_param.GetChecked()
if len(checked) > 1 and 5 in checked:
self.list_param.Check(5, check=False)