Reputation: 1619
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.
Upvotes: 1
Views: 1638
Reputation: 344
It's a little trick, but you can think of something like this.
import tkinter as tk
root = tk.Tk()
def lower_window(event):
root.lower()
root.bind('<FocusIn>', lower_window)
root.mainloop()
Upvotes: 0
Reputation: 386335
No, there is no method in tkinter that forces the window to be below all other windows on the desktop.
Upvotes: 0
Reputation: 1857
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.
Upvotes: 0