Too many Configure events

Fredrik Juhlin laz at strakt.com
Wed Jan 9 02:57:45 EST 2002


I seem to only get Bob Greschke's mails on this subject, so apologies if I
repeat what has been said before.

On Tue, Jan 08, 2002 at 09:20:52AM -0800, Bob Greschke wrote:
[snipped description of trying to use .after() non-successfully]

Did you also try using the .after_idle() method? It seems to me like that
ought to work better, since it will only call the callback when the event
queue is empty. You'll need some sort of flag to make sure that you don't
call it repeatedly, but that's a trivial problem in the great scheme of
things.

This ought to be near perfect. If the user pauses or is generally slow, your
app will have time to redraw (which I recon is what you'll want it to do,
since quite likely the user is pausing or being slow to get a chance to see
what the result of the resize will be). Trying to make it only redraw once
(when the user finally releases the mouse button) would ruin the entire
point for users that have their WM show the contents of the window while
resizing. Besides, you shouldn't depend on resizes to made by using the
mouse anyway. What if they're using key sequences?

//FJ




More information about the Python-list mailing list