Tkinter 窗口分层

编程入门 行业动态 更新时间:2024-10-17 18:19:48
本文介绍了Tkinter 窗口分层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有两个 Tkinter 窗口,如何让一个窗口始终位于另一个窗口之上?

I have two Tkinter windows, How do I keep one window always on top of the other?

推荐答案

AFAIK 无能为力.根据官方tk文档,

There isn't anything you can do AFAIK. According to the official tk documentation,

...没有可靠的跟踪方法更改窗口中的位置堆叠顺序.

...there is no reliable way to track changes to a window's position in the stacking order.

您能做的最好的事情就是定期将一个窗口升高到另一个之上.我不建议这样做,因为它可能会产生一些非常灾难性的副作用(例如,使用户很难或不可能移动始终低于最顶部的窗口)

About the best you could do is to periodically raise one window above the other. I don't recommend that because it may have some really disastrous side effects (for example, making it difficult or impossible for the user to move the window that is always lower than the top-most one)

这篇关于Tkinter 窗口分层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 06:30:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1390663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗口   Tkinter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!