Tkinter - the app that wouldn't quit

Rob Hooft r.hooft at euromail.net
Mon Apr 19 10:07:01 EDT 1999


>>>>> "RH" == Randall Hopper <aa8vb at vislab.epa.gov> writes:

 RH> Do I need to add special testing-harness hooks into the dialog
 RH> class, or is there a general way to determine when a dialog
 RH> destroys/unmaps itself from outside of the dialog code?

Using Tkinter, you can "wait" for a few specific events.

"w.wait_window()" will wait for w to be destroyed. But even then, a
destroyed window can not be reused!

Alternatively wait_visibility() and wait_variable() methods can be used.

I come back to my advertisement: in the *Dialog() classes in the Pmw
framework this has all been programmed (using a wait_variable in that
case); there is no real reason except "the fun of it" to reinvent this
wheel...

Regards,

Rob Hooft.

-- 
=====   R.Hooft at EuroMail.net   http://www.xs4all.nl/~hooft/rob/  =====
=====   R&D, Nonius BV, Delft  http://www.nonius.nl/             =====
===== PGPid 0xFA19277D ========================== Use Linux! =========





More information about the Python-list mailing list