+ self.log.WriteText("OnItemSelected: %s, %s, %s, %s\n" %
+ (self.currentItem,
+ self.list.GetItemText(self.currentItem),
+ self.getColumnText(self.currentItem, 1),
+ self.getColumnText(self.currentItem, 2)))
+ if self.currentItem == 10:
+ self.log.WriteText("OnItemSelected: Veto'd selection\n")
+ #event.Veto() # doesn't work
+ # this does
+ self.list.SetItemState(10, 0, wxLIST_STATE_SELECTED)
+
+ def OnItemActivated(self, event):
+ self.currentItem = event.m_itemIndex
+ self.log.WriteText("OnItemActivated: %s\n" % self.list.GetItemText(self.currentItem))