By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

prevent an application to be closed by the user

P: 1
Hi all,
I am making a python script for a university project.
I have created a GUI using a TKinter which allows the user to browse the information contained in a Database.
Since this application has to run for several days and I would like to prevent the user to close (or interact with it) the application by clicking in the top-right "X" .
Any idea???
Thanks a lot
Gian Paolo
Apr 29 '07 #1
Share this Question
Share on Google+
1 Reply


bartonc
Expert 5K+
P: 6,596
Hi all,
I am making a python script for a university project.
I have created a GUI using a TKinter which allows the user to browse the information contained in a Database.
Since this application has to run for several days and I would like to prevent the user to close (or interact with it) the application by clicking in the top-right "X" .
Any idea???
Thanks a lot
Gian Paolo
In Tkinter, there's a thing call wm.protocol (window manager). The answer depends on your OS, but generally it's not a good idea to have an un-closable GUI hanging around. Popping up a dialog that says "Close this program?" with a choice of whether to proceed or not is semi-tolerable bending of UI rules (im my book).
Apr 30 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.