def refresh(self, args=None): """This methods fills the self.window list by all the objects we want shown on this screen. Title and Spokes mostly.""" TUIObject.refresh(self, args) self._container = ListRowContainer(2, columns_width=39, spacing=2) for w in self._spokes_map: self._container.add(w, callback=self._item_called, data=w) self.window.add_with_separator(self._container)
def refresh(self, args=None): """This methods fills the self._window list by all the objects we want shown on this screen. Title and Spokes mostly.""" TUIObject.refresh(self, args) def _prep(i, w): number = tui.TextWidget("%2d)" % i) return tui.ColumnWidget([(3, [number]), (None, [w])], 1) # split spokes to two columns left = [_prep(i, w) for i, w in self._keys.iteritems() if i % 2 == 1] right = [_prep(i, w) for i, w in self._keys.iteritems() if i % 2 == 0] c = tui.ColumnWidget([(39, left), (39, right)], 2) self._window.append(c) return True
def refresh(self, args=None): """This methods fills the self._window list by all the objects we want shown on this screen. Title and Spokes mostly.""" TUIObject.refresh(self, args) def _prep(i, w): number = tui.TextWidget("%2d)" % i) return tui.ColumnWidget([(3, [number]), (None, [w])], 1) # split spokes to two columns left = [_prep(i, w) for i, w in self._keys.items() if i % 2 == 1] right = [_prep(i, w) for i, w in self._keys.items() if i % 2 == 0] c = tui.ColumnWidget([(39, left), (39, right)], 2) self._window.append(c) return True
def refresh(self, args=None): TUIObject.refresh(self, args)
def refresh(self, args=None): TUIObject.refresh(self, args) return True