intractable(?) Tkinter scrollbar problem

Doug Hellmann doughellmann at mindspring.com
Tue Jun 1 16:20:17 CEST 1999


Part of the problem may be related to comparing floating point values
for exact equality to one another.  Specifically, the comparison of
float(hi) >= 1.0.
 
I was able to make the code not show the scrollbars at all, with no
flicker, by changing:
 
if float(lo) <= 0.0 and float(hi) >= 1.0:
 
to

if lowtest <= 0.0 and (float(hi) - 1.0) <= 0.0:

However, when I resize the window smaller set() isn't called again, so
there isn't an opportunity to have them come back.  That seems to be an
issue of catching the resize event, though, but I'm a bit unclear on how
that works.  I tried registering a function for '<Configure>', and it
was called once on startup.  But when I resize the window it isn't
called.

Have I headed off in the wrong direction here?

Doug




More information about the Python-list mailing list