Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tkinter Scrollbar bad behavior [re. bug #10232]

Reply
Thread Tools

Tkinter Scrollbar bad behavior [re. bug #10232]

 
 
Robert A. Lerche
Guest
Posts: n/a
 
      10-30-2010
I am trying to use Tkinter to create a custom scrollable widget,
similar to a list box but with 3 Entry fields per row. In the real
application each Entry has a separate input validation routine.

I have placed a test case file in the bug I reported:
http://bugs.python.org/issue10232

The most serious issue is the behavior on MS Windows. In my sample
program the scroll bar slider has a problem. When slowly moved down
it works for the first few rows but fails near the bottom of travel.
Near the bottom it rapidly generates "moveto" commands that jump
between rows 4 and 7, causing the display to flash until button 1 is
released.

This behavior does not occur on Linux -- there scrolling using the
slider is smooth top to bottom.

Terry Reedy confirmed this behavior still exists in Python 3 (I tested
in 2.7 on Windows and 2.6.2 on Linux.

He suggested I post here as there may be someone more familiar with
Tkinter who could shed some light. Thanks in advance.
 
Reply With Quote
 
 
 
 
rantingrick
Guest
Posts: n/a
 
      10-30-2010
Robert,

First and foremost if you wish to scroll a window then why not use the
TIX.ScrolledWindow widget instead. It even shows and hides the
scrollbar when necessary.

#-- Start Script --#
from Tix import *
#from Tkconstants import *

class App(Tk): # Must use Tk for Tix incompability
def __init__(self):
Tk.__init__(self)
self._createWidgets()

def _createWidgets(self):
swin = ScrolledWindow(self, width=400, height=300)
swin.pack(fill=BOTH, expand=1)
frame = swin.window
col, row = 0,0
for row in range(100):
for col in range(3):
w=Button(frame, text='This is button (%02d, %02d)' %
(col, row))
w.grid(row=row, column=col)
col += 1
row += 1


if __name__ == '__main__':
app = App()
app.mainloop()
#-- End Script --#
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad media, bad files or bad Nero? John Computer Information 23 01-08-2008 09:17 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM
ScrollBar? Does it exist just WEB ScrollBar Control? Alex ASP .Net Web Controls 1 04-04-2004 12:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57