本文整理汇总了Python中pyanaconda.ui.tui.tuiobject.TUIObject.refresh方法的典型用法代码示例。如果您正苦于以下问题:Python TUIObject.refresh方法的具体用法?Python TUIObject.refresh怎么用?Python TUIObject.refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyanaconda.ui.tui.tuiobject.TUIObject
的用法示例。
在下文中一共展示了TUIObject.refresh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: refresh
# 需要导入模块: from pyanaconda.ui.tui.tuiobject import TUIObject [as 别名]
# 或者: from pyanaconda.ui.tui.tuiobject.TUIObject import refresh [as 别名]
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)
示例2: refresh
# 需要导入模块: from pyanaconda.ui.tui.tuiobject import TUIObject [as 别名]
# 或者: from pyanaconda.ui.tui.tuiobject.TUIObject import refresh [as 别名]
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
示例3: refresh
# 需要导入模块: from pyanaconda.ui.tui.tuiobject import TUIObject [as 别名]
# 或者: from pyanaconda.ui.tui.tuiobject.TUIObject import refresh [as 别名]
def refresh(self, args=None):
TUIObject.refresh(self, args)
return True