+ menu = wxPyMenu()
+ tPopupID1 = 0
+ tPopupID2 = 1
+ tPopupID3 = 2
+ menu.Append(tPopupID1, "One")
+ menu.Append(tPopupID2, "Two")
+ menu.Append(tPopupID3, "Three")
+ EVT_MENU(self, tPopupID1, self.OnPopupOne)
+ EVT_MENU(self, tPopupID2, self.OnPopupTwo)
+ EVT_MENU(self, tPopupID3, self.OnPopupThree)
+ pos = self.list.GetItemPosition(self.currentItem)
+ self.PopupMenu(menu, self.x, pos.y)
+
+ def OnPopupOne(self, event):
+ self.log.WriteText("Popup one\n")
+
+ def OnPopupTwo(self, event):
+ self.log.WriteText("Popup two\n")
+
+ def OnPopupThree(self, event):
+ self.log.WriteText("Popup three\n")