Tkinter window at the bottom all the time

Deadly 提交于 2019-12-24 08:24:51

问题


I already know tkinter.Tk().attributes("-topmost", True) which makes the window stay on top all the time. But is there some way to make the window stay at the bottom all the time? I mean something like tkinter.Tk().attributes("-bottommost", True) or something like that.


回答1:


No, there is no method in tkinter that forces the window to be below all other windows on the desktop.




回答2:


There is not strictly a way to make a Tk window always underneath others. If your aim is to have a Tk application which cannot be seen, then you could achieve it by modiying the alpha value of the root window:

from tkinter import *
root = Tk()
root.attributes('-alpha', 0)
root.mainloop()

As this window is transparent, you could think of it as always underneath.



来源:https://stackoverflow.com/questions/47122453/tkinter-window-at-the-bottom-all-the-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!