+ # Now that the list exists we can init the other base class,
+ # see wxPython/lib/mixins/listctrl.py
+ self.itemDataMap = musicdata
+ listmix.wxColumnSorterMixin.__init__(self, 3)
+ #self.SortListItems(0, True)
+
+ self.Bind(wx.EVT_SIZE, self.OnSize)
+
+ self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, self.list)
+ self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected, self.list)
+ self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated, self.list)
+ self.Bind(wx.EVT_LIST_DELETE_ITEM, self.OnItemDelete, self.list)
+ self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick, self.list)
+ self.Bind(wx.EVT_LIST_COL_RIGHT_CLICK, self.OnColRightClick, self.list)
+ self.Bind(wx.EVT_LIST_COL_BEGIN_DRAG, self.OnColBeginDrag, self.list)
+ self.Bind(wx.EVT_LIST_COL_DRAGGING, self.OnColDragging, self.list)
+ self.Bind(wx.EVT_LIST_COL_END_DRAG, self.OnColEndDrag, self.list)
+ self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginEdit, self.list)
+
+ self.list.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
+ self.list.Bind(wx.EVT_RIGHT_DOWN, self.OnRightDown)
+
+ # for wxMSW
+ self.list.Bind(wx.EVT_COMMAND_RIGHT_CLICK, self.OnRightClick)
+
+ # for wxGTK
+ self.list.Bind(wx.EVT_RIGHT_UP, self.OnRightClick)