正如标题所示,是否可以检查 tkinter 窗口是否已撤回?
我知道这样一个事实,每当我撤回/取消图标化窗口时,我都可以切换 True/False 变量,但就我而言,这太困惑了。
最佳答案
您可以调用方法winfo_viewable
,该方法返回小部件是否可见。
来自官方 tcl/tk 文档:
Returns 1 if window and all of its ancestors up through the nearest toplevel window are mapped. Returns 0 if any of these windows are not mapped.
关于python - 检查tkinter窗口是否被撤回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49989727/