def __init__(self, parent, model): wid = wx.NewId() wx.TreeCtrl.__init__(self, parent, wid, style=wx.TR_HAS_BUTTONS | wx.SUNKEN_BORDER | wx.TR_EDIT_LABELS) EditorView.__init__(self, model, ( ('Refresh', self.OnRefresh, self.refreshBmp, 'Refresh'), ('-', None, '', ''), ('Add group', self.OnAddGroup, self.addGroupBmp, ''), ('Remove group', self.OnRemoveGroup, self.remGroupBmp, ''), ('Rename group', self.OnRenameGroup, '-', ''), ('-', None, '', ''), ('Move up', self.OnMoveUp, self.moveUpBmp, ''), ('Move down', self.OnMoveDown, self.moveDownBmp, ''), ('Move fields to other group', self.OnMoveFieldToGroup, '-', ''), ), -1) self.Bind(wx.EVT_KEY_UP, self.OnKeyPressed) self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit, id=wid) self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnEndLabelEdit, id=wid) self._groupedFields = [] self.canExplore = True self.active = True
def __init__(self, parent, model): wid = wx.NewId() wx.TreeCtrl.__init__(self, parent, wid, style = wx.TR_HAS_BUTTONS | wx.SUNKEN_BORDER | wx.TR_EDIT_LABELS) EditorView.__init__(self, model, (('Refresh', self.OnRefresh, self.refreshBmp, 'Refresh'), ('-', None, '', ''), ('Add group', self.OnAddGroup, self.addGroupBmp, ''), ('Remove group', self.OnRemoveGroup, self.remGroupBmp, ''), ('Rename group', self.OnRenameGroup, '-', ''), ('-', None, '', ''), ('Move up', self.OnMoveUp, self.moveUpBmp, ''), ('Move down', self.OnMoveDown, self.moveDownBmp, ''), ('Move fields to other group', self.OnMoveFieldToGroup, '-', ''), ), -1) self.Bind(wx.EVT_KEY_UP, self.OnKeyPressed) self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit, id=wid) self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnEndLabelEdit, id=wid) self._groupedFields = [] self.canExplore = True self.active = True
def destroy(self): EditorView.destroy(self) self.tokenImgLst = None