def __init__(self, name='TwinCList'): HPaned.__init__(self) self.set_name(name) self.Lbox = ListBox([], name='%s-left' % name, columns=[]) self.Rbox = ListBox([], name='%s-right' % name, columns=[]) self.add1(self.Lbox) self.add2(self.Rbox) self.show()
def _make_listbox(self, rowlist, columns): if self.listbox: self.listbox.destroy() self.listbox = None self.listbox = ListBox(rowlist, name=self.get_name(), columns=columns) #self.columns = self.listbox._col_titles #self.scroll.add_with_viewport(self.listbox) self.listbox.set_name(self._name) self.__lb_container__.add(self.listbox) if self._rcfun: event = 'button_press_event' if self._rcmenu: self.listbox.connect(event, self._rcfun, self._rcmenu) else: self.listbox.connect(event, self._rcfun) if self._dnd: self.listbox.connect('drag_data_get', self._dnd) self.listbox.drag_source_set(BUTTON1_MASK, self._targets_, ACTION_COPY)
def Rfill(self, rows, columns): self.Rbox.destroy() self.Rbox = ListBox(rows, name='right', columns=columns) self.add1(self.Rbox)
def Lfill(self, rows, columns): self.Lbox.destroy() self.Lbox = ListBox(rows, name='left', columns=columns) self.add1(self.Lbox)