本文整理汇总了Python中widget.Widget.refresh方法的典型用法代码示例。如果您正苦于以下问题:Python Widget.refresh方法的具体用法?Python Widget.refresh怎么用?Python Widget.refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类widget.Widget
的用法示例。
在下文中一共展示了Widget.refresh方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: refresh
# 需要导入模块: from widget import Widget [as 别名]
# 或者: from widget.Widget import refresh [as 别名]
def refresh(self):
"""
Redraw border for EditBox and command an underlying window refresh.
"""
if self.__border:
rectangle(self.window, self.y-1, self.x-1, self.y+1, self.x+self.cols)
Widget.refresh(self)
示例2: refresh
# 需要导入模块: from widget import Widget [as 别名]
# 或者: from widget.Widget import refresh [as 别名]
def refresh(self):
"""
Redraw the ListBox on the screen.
"""
# draw list bounding box
curses.textpad.rectangle(self.window, self.y, self.x, self.y+self.rows-1, self.x+self.cols-1)
# draw visible portion of list box data
self.__listwin.overwrite(self.window, self.__page_offset, 0, self.y+1, self.x+1, self.y+self.rows-2, self.x+self.cols-2)
Widget.refresh(self)
示例3: refresh
# 需要导入模块: from widget import Widget [as 别名]
# 或者: from widget.Widget import refresh [as 别名]
def refresh(self):
"""
Redraw button based on active or inactive state.
"""
if self.__active:
self.window.addstr(self.y, self.x, "[")
self.window.addstr(self.y, self.x+self.cols, "]")
self.window.addstr(self.y, self.x+2, self.data, curses.A_REVERSE)
else:
self.window.addstr(self.y, self.x, "<")
self.window.addstr(self.y, self.x+self.cols, ">")
self.window.addstr(self.y, self.x+2, self.data)
Widget.refresh(self)