We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For Example :
def on_close(): print ("Closed application")
root = tkinter.Tk() root.protocol("WM_DELETE_WINDOW", on_close) app = Application(root) app.run()
Not sure how to catch window close event. It will be helpful if anyone can suggest me on this.
(Big thanks for pygubu ☺️ )
The text was updated successfully, but these errors were encountered:
Hello rameshgandhim,
To close the window you need to call the destroy method in the toplevel widget. I have just created a wiki page to show how is done.
https://github.com/alejandroautalan/pygubu/wiki/CapturingDeleteWindowEvent
Thanks for trying pygubu. Regards.
Sorry, something went wrong.
Thanks alejandro!!
It seems like i was doing
if __name__ == '__main__': root = tk.Tk() app = Application(root) app.run()
It works if i change app.run() to root.mainloop() to :
if __name__ == '__main__': root = tk.Tk() app = Application(root) root.mainloop()
No branches or pull requests
For Example :
def on_close():
print ("Closed application")
root = tkinter.Tk()
root.protocol("WM_DELETE_WINDOW", on_close)
app = Application(root)
app.run()
Not sure how to catch window close event.
It will be helpful if anyone can suggest me on this.
(Big thanks for pygubu☺️ )
The text was updated successfully, but these errors were encountered: