鱼C论坛

 找回密码
 立即注册
查看: 10954|回复: 10

[Tkinter] Tkinter 窗口组件:Toplevel

[复制链接]
发表于 2015-5-17 12:35:39 | 显示全部楼层 |阅读模式
购买主题 已有 12 人购买  本主题需向作者支付 10 鱼币 才能浏览
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2016-11-24 09:02:16 | 显示全部楼层
谢谢楼在分享
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-2-11 23:00:56 | 显示全部楼层
谢谢,我刚刚开始学习
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-8-8 14:35:23 | 显示全部楼层
后面的怎么都没人评论了,可能很多人没坚持下来吧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

头像被屏蔽
发表于 2018-10-19 16:38:06 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2018-12-26 16:54:55 | 显示全部楼层
方法

deiconify()
Displays the window, after using either the iconify or the withdraw methods.
在使用iconify或者withdraw方法后,显示窗口。

frame()
Returns a system-specific window identifier.
返回一个系统特定的窗口标识符

group(window)
Adds the window to the window group administered by the given window.
给特定的窗口分组

iconify()
Turns the window into an icon, without destroying it.
把窗口变成了一个图标,且不破坏它

protocol(name, function)
Registers a function as a callback which will be called for the given protocol.
给特定的协议添加一个回调函数

state()
Returns the current state of the window. Possible values are normal, iconic, withdrawn, and icon.
返回窗口的当前状态。可能的值是正常的,标志性、撤销和图标。

transient([master])
Turns the window into a temporary(transient) window for the given master, or to the window's parent, when no argument is given.
把窗口作为临时窗口给master,如果没有给参数,就给父窗口

withdraw()
Removes the window from the screen, without destroying it.
从屏幕上删除窗口,且不破坏它。

maxsize(width, height)
Defines the maximum size for this window.
定义这个窗口的最大尺寸。

minsize(width, height)
Defines the minimum size for this window.
定义这个窗口的最小尺寸。

positionfrom(who)
Defines the position controller.
定义位置控制器。

resizable(width, height)
Defines the resize flags, which control whether the window can be resized.
定义大小标志,它控制是否可以调整大小的窗口。

sizefrom(who)
Defines the size controller.
定义尺寸的控制器。

title(string)
Defines the window title.
定义窗口名字。

评分

参与人数 1荣誉 +5 鱼币 +4 贡献 +3 收起 理由
太阳风暴 + 5 + 4 + 3

查看全部评分

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-8-14 22:22:23 | 显示全部楼层

谢谢楼在分享
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-10-15 16:43:11 | 显示全部楼层
确实是好东西啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-4-24 15:04:22 | 显示全部楼层
楼主你好, 可否能在Toplevel这个窗口中, 添加文本框, 从而输入并获取呢, 这块有点费解
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-1-15 10:44:13 | 显示全部楼层
如何只能创建一个 toplevel 窗口?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-1-15 12:47:18 | 显示全部楼层
我是桃川人 发表于 2021-1-15 10:44
如何只能创建一个 toplevel 窗口?

root = Tk()
top = Toplevel(master=root)
top.grab_set()  # master=root 后加上这个方法让根界面无法进行操作
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-28 17:05

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表