[Tutor] cannot get a label message to display immediately

Alan Gauld alan.gauld at btinternet.com
Fri Aug 14 22:08:39 CEST 2015


On 14/08/15 17:50, Alex Kleider wrote:

> Might it be possible to insert the code that posts the 'label' into the
> beginning of the function's code block?

That doesn't work because the GUI won't redraw itself until
the event handler finishes and returns control to the Tkinter
event loop. That's why you must avoid long running event
handlers.

You can force a redraw periodically from within the handler
but that doesn't really help much - the GUI is still frozen
for the user which is the biggest issue!.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list