def on_left_down(self, event):
if self.HitTest(event.GetPosition()) != wx.NOT_FOUND:
index = self.HitTest(event.GetPosition())
self.selected_items[index] = not self.selected_items[index]
# doesn't really work to update selection direclty (focus issues)
# instead we wait for the EVT_LISTBOX event and fix the selection
# there...
# self.update_selection()
# TODO: we could probably use wx.CallAfter
event.Skip()
评论列表
文章目录