From the link I provided, I don't think you can directly edit the titlebar as it's managed by the systems window manager.
Probably best option is to use root.resizable(False, False)
A way to detect an open window. Not elegant but works
Probably best option is to use root.resizable(False, False)
A way to detect an open window. Not elegant but works
import tkinter as tk root = tk.Tk() root.minsize(400,200) def window(): top = tk.Toplevel(None) top.geometry('+300+300') if top.winfo_exists(): label.config(text='Window is open') top.protocol('WM_DELETE_WINDOW', lambda: change(top)) def change(top): label.config(text='Window is closed') top.destroy() label = tk.Label(root, text='Window is closed') label.pack() btn = tk.Button(root, text='Open Window', command=window) btn.pack(pady=10) root.mainloop()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts