Tkinter 8.5 参考手册: a GUI for Python (五)11 窗口的名称
来源:互联网 发布:软件培训机构排名 编辑:程序博客网 时间:2024/06/16 12:05
5.11. Window names
The term window describes a rectangular area on the desktop.
A top-level or root window is a window that has an independent existence under the window manager. It is decorated with the window manager's decorations, and can be moved and resized independently. Your application can use any number of top-level windows.
The term “window” also applies to any widget that is part of a top-level window.
Tkinter names all these windows using a hierarchical window path name.
The root window's name is
'.'
.Child windows have names of the form
'.
, wheren
'
is some integer in string form. For example, a window namedn
'.135932060'
is a child of the root window ('.'
).Child windows within child windows have names of the form
'
wherep
.n
'
is the name of the parent window andp
is some integer. For example, a window namedn
'.135932060.137304468'
has parent window'.135932060'
, so it is a grandchild of the root window.The relative name of a window is the part past the last
'.'
in the path name. To continue the previous example, the grandchild window has a relative name'137304468'
.
To get the path name for a widget
, use w
str(
. w
)
See also Section 26, “Universal widget methods” for methods you can use to operate on window names, especially the .winfo_name
, .winfo_parent
, and .winfo_pathname
methods.
- Tkinter 8.5 参考手册: a GUI for Python (五)11 窗口的名称
- Tkinter 8.5 参考手册: a GUI for Python (五)
- Tkinter 8.5 参考手册: a GUI for Python (五)1
- Tkinter 8.5 参考手册: a GUI for Python (五)2
- Tkinter 8.5 参考手册: a GUI for Python (五)3
- Tkinter 8.5 参考手册: a GUI for Python (五)4
- Tkinter 8.5 参考手册: a GUI for Python (五)5
- Tkinter 8.5 参考手册: a GUI for Python (五)6
- Tkinter 8.5 参考手册: a GUI for Python (五)7
- Tkinter 8.5 参考手册: a GUI for Python (五)9图像
- Tkinter 8.5 参考手册: a GUI for Python
- Tkinter 8.5 参考手册: a GUI for Python (五)10字符串表示的几何图形
- Tkinter 8.5 参考手册: a GUI for Python (五)8(鼠标)指针
- Tkinter 8.5 参考手册: a GUI for Python (二)
- Tkinter 8.5 参考手册: a GUI for Python (三)
- Tkinter 8.5 参考手册: a GUI for Python (四)
- Tkinter 8.5 参考手册: a GUI for Python(一)
- Tkinter 8.5 参考手册: a GUI for Python (二)
- Tkinter 8.5 参考手册: a GUI for Python (五)6
- Tkinter 8.5 参考手册: a GUI for Python (五)7
- Tkinter 8.5 参考手册: a GUI for Python (五)8(鼠标)指针
- Tkinter 8.5 参考手册: a GUI for Python (五)9图像
- Tkinter 8.5 参考手册: a GUI for Python (五)10字符串表示的几何图形
- Tkinter 8.5 参考手册: a GUI for Python (五)11 窗口的名称
- 二零一五,外面的世界很精彩
- Python中ConfigParser模块应用
- 使用 ContentProvider 管理联系人(包括每人有多个电话号码)
- leetcode之Spiral Matrix
- Node.js的REPL环境
- OC代码习惯----在头文件中尽量少import其他头文件
- goto 语句(虽然不提倡使用goto 但是比赛的时候还蛮好用滴)
- 找到与出问题android手机系统版本一样的源码