ScrollBar for List box : ListBox « GUI Tk « Python






ScrollBar for List box

ScrollBar for List box

from Tkinter import *

root = Tk()
root.title('Scrollbar')

list = Listbox(root, height=6, width=15)
scroll = Scrollbar(root, command=list.yview)

list.configure(yscrollcommand=scroll.set)
list.pack(side=LEFT)
scroll.pack(side=RIGHT, fill=Y)

for item in range(30):
    list.insert(END, item)
root.mainloop()


           
       








Related examples in the same category

1.Insert image to a List box
2.ListBox with scrollBarListBox with scrollBar
3.Get selected value from ListboxGet selected value from Listbox
4.List Box: insert itemsList Box: insert items
5.List box demoList box demo
6.Scrolled ListScrolled List