Hello, I am working on an iMac running OS 10.7, TK 8.5.11. I built a simple app containing a Notebook widget, and with Listboxes and linked tkk.Scrollbars on each of three tabs. All of the Scrollbars work the first time I manipulate them, but once the Scrollbar on third tab (the last one created by the script) is manipulated, the others become unresponsive to mouse clicks (though the Scrollbars continue to move when the Listboxes are scrolled using the mouse/trackpad. I first found this issue working with Python 3.2.3 (using IDLE), but the same thing happens with Python 3.3. The problem was recreated by someone on the Python Bug Report list using the same system configuration. I asked someone to try this on a PC (Windows 7, Python 3.2.3, Tkinter 8.5), but the problem wasn't recreated.
David Beck
from tkinter import * from tkinter import ttk def switchTab(): newTab=tabList[1] fieldbook.select(tab_id=newTab) root = Tk() root.geometry('1000x700+1000+40') root.resizable(FALSE,FALSE) root.rowconfigure(0,weight=1) root.columnconfigure(0,weight=1) root.title("Electronic Fieldbook") fieldbook = ttk.Notebook(root) f1 = ttk.Frame(fieldbook); f2 = ttk.Frame(fieldbook); f3 = ttk.Frame(fieldbook); f4 = ttk.Frame(fieldbook); f5 = ttk.Frame(fieldbook); f6 = ttk.Frame(fieldbook); f7 = ttk.Frame(fieldbook); f8 = ttk.Frame(fieldbook); f9 = ttk.Frame(fieldbook); fieldbook.add(f1, text="Home") fieldbook.add(f2, text="Lexicon") fieldbook.add(f3, text="Texts") fieldbook.add(f4, text="Examples") fieldbook.add(f5, text="Datasets") fieldbook.add(f6, text="Concordances") fieldbook.add(f7, text="Paradigms") fieldbook.add(f8, text="Abbreviations") fieldbook.add(f9, text="Index") ##create tabs homeLabel=ttk.Label(f1, text="Lhome") lexiconLabel=ttk.Label(f2, text="Llexicon") textsLabel=ttk.Label(f3, text="Ltexts") examplesLabel=ttk.Label(f4, text="Lexamples") datasetsLabel=ttk.Label(f5, text="Ldatasets") concordancesLabel=ttk.Label(f6, text="Lconcordances") paradigmsLabel=ttk.Label(f7, text="Lparadigms") abbrvLabel=ttk.Label(f8, text="Labbreviations") indexLabel=ttk.Label(f9, text="Lindex") ##create home widgets lexBox = Listbox(f1, height = 32) lexScrl = ttk.Scrollbar(f1, orient=VERTICAL, command=lexBox.yview) LexHomeLabel = ttk.Label(f1, text="Lexicon") testButton = ttk.Button(f1, text="Test", command=switchTab) ##create Lexicon widgets navBox = Listbox(f2, height = 35) navScrl = ttk.Scrollbar(f2, orient=VERTICAL, command=navBox.yview) ##create Text widgets txtBox = Listbox(f3, height = 35) txtScrl = ttk.Scrollbar(f3, orient=VERTICAL, command=txtBox.yview) ##grid widgets fieldbook.grid(row=0, column=0, sticky=(N,W,S,E)) ## grid home widgets LexHomeLabel.grid(row=0,column=0, sticky=(N)) lexBox.grid(row=1, column=0, sticky=(N,W,S,E)) for i in range(1,101): lexBox.insert('end', 'Line %d of 100' % i) lexScrl.grid(row=1,column=1, sticky=(N,S)) lexBox['yscrollcommand'] = lexScrl.set testButton.grid(column=3, row= 2, sticky=(S,E)) ##grid lexicon widgets navBox.grid(row=0, column=0, sticky=(N,W,S,E)) for i in lexBox.get(0, 'end'): navBox.insert('end', i) navScrl.grid(row=0,column=1, sticky=(N,S)) navBox['yscrollcommand'] = navScrl.set ##grid txt widgets txtBox.grid(row=0, column=0, sticky=(N,W,S,E)) for i in range(1,101): txtBox.insert('end', 'Text %d of 100' % i) txtScrl.grid(row=0,column=1, sticky=(N,S)) txtBox['yscrollcommand'] = txtScrl.set ##grid other widgets textsLabel.grid(row=0,column=0) examplesLabel.grid(row=0,column=0) datasetsLabel.grid(row=0,column=0) concordancesLabel.grid(row=0,column=0) paradigmsLabel.grid(row=0,column=0) abbrvLabel.grid(row=0,column=0) indexLabel.grid(row=0,column=0) tabList = fieldbook.tabs() root.mainloop()
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss