To keep a Tkinter window constantly displayed at the bottom, you can use the wm_attributes
method and set the -topmost
attribute to True
. This will ensure that the window always stays on top of other windows, even if they are brought to focus.
Here's some example code:
import tkinter as tk
root = tk.Tk()
# set the window size
root.geometry("300x200")
# set the window title
root.title("Bottom Window")
# keep the window at the bottom
root.wm_attributes("-topmost", True)
# start the main event loop
root.mainloop()
Note that setting the -topmost
attribute to True
can cause some issues with other applications, as the window will always be on top. Consider setting it to False
when the window loses focus or when the user interacts with other applications.
Asked: 2023-07-05 00:48:52 +0000
Seen: 8 times
Last updated: Jul 05 '23