def __init__(self, parent, **kwds): Box.__init__(self, parent, 'horizontal', **kwds) self.splitter = Splitter(self, 'horizontal') self.tree = Tree(self.splitter) self.tree.enable_drop(['grafit-object']) self.tree.connect('drop-hover', self.on_drop_hover) self.tree.connect('drop-ask', self.on_tree_drop_ask) self.tree.connect('dropped', self.on_tree_dropped) self.tree.connect('selected', self.on_tree_selected) self.list = List(self.splitter, editable=True) self.list.enable_drop(['grafit-object', 'filename']) self.list.connect('drop-hover', self.on_drop_hover) self.list.connect('dropped', self.on_dropped) self.list.connect('drop-ask', self.on_drop_ask) self.list.connect('drag-begin', self.on_begin_drag) self.list.connect('item-activated', self.on_list_item_activated) self.list.connect('right-click', self.on_list_right_click) self.list.connect('end-edit', self.on_item_edited)
def __init__(self, actionlist, parent, **place): Box.__init__(self, parent, 'vertical', **place) self.list = List(self, model=ActionListModel(actionlist), stretch=1.) self.list._widget.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL)) self.list.connect('item-activated', self.on_list_item_activated) self.list.connect('selection-changed', self.on_list_selection_changed) # self.label = Label(self, 'Action', stretch=0.) self.label = Html(self, stretch=.5)