当前位置: 首页>>代码示例>>Python>>正文


Python Widget.refresh方法代码示例

本文整理汇总了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)
开发者ID:msmiley,项目名称:pycurseslib,代码行数:9,代码来源:editbox.py

示例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)
开发者ID:msmiley,项目名称:pycurseslib,代码行数:12,代码来源:listbox.py

示例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)
开发者ID:msmiley,项目名称:pycurseslib,代码行数:15,代码来源:button.py


注:本文中的widget.Widget.refresh方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。