[Tkinter-discuss] xscrollbar

geon geon at post.cz
Fri Nov 18 19:31:08 CET 2005


I am not able to make x Scrollbar working. What is wrong? Thank you.

from Tkinter import *

root = Tk()

scrollbar = Scrollbar(root, orient=HORIZONTAL)
scrollbar.pack(side=BOTTOM, fill=X)

text = Text(root, xscrollcommand=scrollbar.set)
for i in range(1000):
    text.insert(END, str(i))
text.pack(side=LEFT, fill=BOTH, expand=YES)

scrollbar.config(command=text.xview)

mainloop()

-- 
geon
Vyjímka je pravidlo. Rekurzivní.



More information about the Tkinter-discuss mailing list