ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](platform.xhtml "platform --- Access to underlying platform's identifying data") | - [上一页](curses.ascii.xhtml "curses.ascii --- Utilities for ASCII characters") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [通用操作系统服务](allos.xhtml) » - $('.inline-search').show(0); | # [`curses.panel`](#module-curses.panel "curses.panel: A panel stack extension that adds depth to curses windows.") --- A panel stack extension for curses - - - - - - Panels are windows with the added feature of depth, so they can be stacked on top of each other, and only the visible portions of each window will be displayed. Panels can be added, moved up or down in the stack, and removed. ## 函数 The module [`curses.panel`](#module-curses.panel "curses.panel: A panel stack extension that adds depth to curses windows.") defines the following functions: `curses.panel.``bottom_panel`()Returns the bottom panel in the panel stack. `curses.panel.``new_panel`(*win*)Returns a panel object, associating it with the given window *win*. Be aware that you need to keep the returned panel object referenced explicitly. If you don't, the panel object is garbage collected and removed from the panel stack. `curses.panel.``top_panel`()Returns the top panel in the panel stack. `curses.panel.``update_panels`()Updates the virtual screen after changes in the panel stack. This does not call [`curses.doupdate()`](curses.xhtml#curses.doupdate "curses.doupdate"), so you'll have to do this yourself. ## Panel Objects Panel objects, as returned by [`new_panel()`](#curses.panel.new_panel "curses.panel.new_panel") above, are windows with a stacking order. There's always a window associated with a panel which determines the content, while the panel methods are responsible for the window's depth in the panel stack. Panel objects have the following methods: `Panel.``above`()Returns the panel above the current panel. `Panel.``below`()Returns the panel below the current panel. `Panel.``bottom`()Push the panel to the bottom of the stack. `Panel.``hidden`()Returns `True` if the panel is hidden (not visible), `False` otherwise. `Panel.``hide`()Hide the panel. This does not delete the object, it just makes the window on screen invisible. `Panel.``move`(*y*, *x*)Move the panel to the screen coordinates `(y, x)`. `Panel.``replace`(*win*)Change the window associated with the panel to the window *win*. `Panel.``set_userptr`(*obj*)Set the panel's user pointer to *obj*. This is used to associate an arbitrary piece of data with the panel, and can be any Python object. `Panel.``show`()Display the panel (which might have been hidden). `Panel.``top`()Push panel to the top of the stack. `Panel.``userptr`()Returns the user pointer for the panel. This might be any Python object. `Panel.``window`()Returns the window object associated with the panel. ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](platform.xhtml "platform --- Access to underlying platform's identifying data") | - [上一页](curses.ascii.xhtml "curses.ascii --- Utilities for ASCII characters") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - [通用操作系统服务](allos.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。