Why Does Closing A Tkinter Child Window With `frame.quit` Exit My Application?
I have a tkinter application with two windows: A MainWindow that is created on startup, and a ChildWindow which is opened after clicking a button. The ChildWindow should close itse
Solution 1:
It is because quit
causes mainloop
to exit. With no event loop running, there's nothing left to keep the main window alive.
If you want to close a child window, call the destroy
method.
self.close_button = tk.Button(..., command=self.top.destroy)
Post a Comment for "Why Does Closing A Tkinter Child Window With `frame.quit` Exit My Application?"