Tkinter and "jumpiness"

klappnase klappnase at
Sun Jun 20 00:57:14 CEST 2004

Douglas Alan <nessus at> wrote in message news:<lc1xkc5ysq.fsf at>...
> Is it possible to double-buffer frame rendering with Tkinter?  I'm
> writing a GUI app using Tkinter and the GUI police around here are
> complaining about the interface being too "jumpy" at times.  If I
> could have the frame rendered offscreen and only put onto the screen
> once it has completely finished being rendered, then this would solve
> the problem.

Have you tried useing wait_visibility() on the frame like this:

frame .wait_visibility(last_widget_that_is_created)

I *think* from what you are writing this should solve your problem (if
understand you correctly).

> One culprit in the jumpiness is a megawidget that I am using that
> initially displays a scrollbar and then a fraction of a second later
> removes the scrollbar when it realizes that it is not necessary.
> |>oug

I had a similar problem with a widget with automatic scrollbars I
wrote; the fix
that worked for me was not to pack() the scrollbar within the
__init__ method; I did the packing/unpacking from within the widget's
xscrollcommand that looks like this:

def _hscroll(self, *args):
        if self.hbar.get() == (0.0, 1.0):
            self.hbar.grid(row=1, column=0, columnspan=2, sticky='ew')

Within the widget's __init__ I just callled self.hbar.set(0.0, 1.0)
and could avoid the initial showing up of the scrollbar.

I hope this helps


More information about the Python-list mailing list