Too many Configure events

Bob Greschke bob at passcal.nmt.edu
Tue Jan 8 11:49:54 EST 2002


I'm looking through everything, but I'm not finding an "Idle" event,
or any way to determine where there are no more events.  Is there a
whole set of event queue fiddling methods someplace?

Thanks!

Bob

"Bernhard Herzog" <bh at intevation.de> wrote in message
news:6qvgegq0b4.fsf at abnoba.intevation.de...
> "Bob Greschke" <bob at passcal.nmt.edu> writes:
>
> > I have a Tkinter program that draws a graph.  If the user grabs a
> > corner of the frame and resizes it I use the Configure event to
clear
> > and redraw the graph.  In (UNIX/Solaris) OpenWindows, and FVWM,
one
> > Configure event gets generated when the user releases the mouse
> > button.  But Gnome generates Configure events while the user is
> > resizing the frame.
>
> The best way to handle this is to only redraw in idle time, i.e.
when no
> more unhandled events are in the queue. Basically, everytime the
> window's contents become invalid you add an idle handler which will
> start the redraw. Since there can be several events that require a
> redraw before the program gets idle, you should check whether you
> already started the idle handler.
>
>   Bernhard
>
> --
> Intevation GmbH
http://intevation.de/
> Sketch
http://sketch.sourceforge.net/
> MapIt!
http://mapit.de/





More information about the Python-list mailing list