Tkinter 8.5 参考手册: a GUI for Python (五)11 窗口的名称

本文档介绍了Tkinter中窗口命名的规则,包括顶级窗口和子窗口的命名方式,以及如何通过窗口路径名来操作和管理这些窗口。窗口名称采用层级结构,根窗口名为'.',子窗口名则包含父窗口的名字和一个唯一整数。通过相对名称可以方便地定位到窗口。你可以使用特定的方法如`winfo_name()`来获取窗口的路径名。
摘要由CSDN通过智能技术生成
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/window-names.html

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 '.n', where n

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值