python - Making a tkinter scrollbar wider -
i'm coding in python 2.7/tkinter in windows , putting scrollbar on listbar, can enough (thanks effbot.org). however, want make scrollbar wider - used on touchscreen easier select it, better. figured width attribute make wider, create blank space. doing wrong here?
code:
from tkinter import * top = tk() scrollbar = scrollbar(top, width=100) scrollbar.pack(side=right, fill=y) listbox = listbox(top, yscrollcommand=scrollbar.set) in range(1000): listbox.insert(end, str(i)) listbox.pack(side=left, fill=both) scrollbar.config(command=listbox.yview) top.mainloop()
yields this:
for scrollbar.pack(side=right, fill=y)
fill=both
instead of fill=y
.
Comments
Post a Comment