I have made a Tkinter program in Python that displays the time and I want it to stay on screen even if I change tabs is there any way of doing this
You can use the -topmost
attribute. Here is the code:
root.attributes("-topmost", True)
Here is an example:
import tkinter as tk
root = tk.Tk()
tk.Label(root, text="Test").pack()
root.attributes("-topmost", True)
root.mainloop()
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.