self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick)
self.Bind(wx.EVT_IDLE, self.OnIdle)
-
self.eventdict = {'EVT_TREE_BEGIN_DRAG': self.OnBeginDrag, 'EVT_TREE_BEGIN_LABEL_EDIT': self.OnBeginEdit,
'EVT_TREE_BEGIN_RDRAG': self.OnBeginRDrag, 'EVT_TREE_DELETE_ITEM': self.OnDeleteItem,
'EVT_TREE_END_DRAG': self.OnEndDrag, 'EVT_TREE_END_LABEL_EDIT': self.OnEndEdit,
self.PopupMenu(menu)
menu.Destroy()
- event.Skip()
def OnItemBackground(self, event):
col1 = data.GetColour().Get()
self.SetItemBackgroundColour(self.current, col1)
dlg.Destroy()
- event.Skip()
def OnItemForeground(self, event):
col1 = data.GetColour().Get()
self.SetItemTextColour(self.current, col1)
dlg.Destroy()
- event.Skip()
def OnItemBold(self, event):
self.SetItemBold(self.current, not self.itemdict["isbold"])
- event.Skip()
def OnItemFont(self, event):
self.SetItemFont(self.current, font)
dlg.Destroy()
- event.Skip()
def OnItemHyperText(self, event):
self.SetItemHyperText(self.current, not self.itemdict["ishtml"])
- event.Skip()
def OnEnableWindow(self, event):
enable = self.GetItemWindowEnabled(self.current)
self.SetItemWindowEnabled(self.current, not enable)
- event.Skip()
-
def OnDisableItem(self, event):
self.EnableItem(self.current, False)
- event.Skip()
def OnItemIcons(self, event):
dlg = TreeIcons(self, -1, bitmaps=bitmaps)
wx.EndBusyCursor()
dlg.ShowModal()
- event.Skip()
def SetNewIcons(self, bitmaps):
dlg.ShowModal()
dlg.Destroy()
- event.Skip()
def OnItemDelete(self, event):
self.Delete(self.current)
self.current = None
- event.Skip()
def OnItemPrepend(self, event):
self.EnsureVisible(newitem)
dlg.Destroy()
- event.Skip()
def OnItemAppend(self, event):
self.EnsureVisible(newitem)
dlg.Destroy()
- event.Skip()
def OnBeginEdit(self, event):