"psao pollard-flamand" <[email protected]> wrote

You know when you click a tkinter button and the window usually freezes until its done?

Actually it doesn't *usually* freeze because most Tkinter apps are designed to prevent that :-)

Does any one know how to stop that?

The key here is that GUI event handlers are intended to be short functions that do one thing at a time. If they have to do more intensive and time consuming actions then the event handler will either: a) launch another function to do that, using a different thread if necessary. b) open a modal dialog that displays progress (or at the very least a warning).

The objective should be to habd control back to the event loop as fast as possible so you can respond to the next event - which might, after all, be a cancel operation!

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to