简体   繁体   中英

Tkinter window at the bottom all the time

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.

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.

不,tkinter中没有方法可以强制该窗口位于桌面上所有其他窗口的下方。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM