self.list.SetImageList(self.il, wxIMAGE_LIST_SMALL)
# Why doesn't this show up on MSW???
- self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
+ #self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
if 0:
# for normal, simple columns, you can add them like this:
self.currentItem = 0
EVT_SIZE(self, self.OnSize)
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
+ EVT_LIST_ITEM_DESELECTED(self, tID, self.OnItemDeselected)
EVT_LIST_ITEM_ACTIVATED(self, tID, self.OnItemActivated)
EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete)
EVT_LIST_COL_CLICK(self, tID, self.OnColClick)
# this does
self.list.SetItemState(10, 0, wxLIST_STATE_SELECTED)
+ # Show how to reselect something we don't want deselected
+ def OnItemDeselected(self, evt):
+ item = evt.GetItem()
+ if evt.m_itemIndex == 11:
+ wxCallAfter(self.list.SetItemState, 11, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
+
+
def OnItemActivated(self, event):
self.currentItem = event.m_itemIndex
self.log.WriteText("OnItemActivated: %s\n" % self.list.GetItemText(self.currentItem))
def OnPopupOne(self, event):
self.log.WriteText("Popup one\n")
+ print "FindItem:", self.list.FindItem(-1, "Roxette")
+ print "FindItemData:", self.list.FindItemData(-1, 11)
def OnPopupTwo(self, event):
self.log.WriteText("Popup two\n")