ListBox with scroll bar : ListBox : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » ListBox »

 

ListBox with scroll bar


ListBox with scroll bar
from Tkinter import *
root = Tk()

scrollbar = Scrollbar(root)
scrollbar.pack(side=RIGHT, fill=Y)

mylist = Listbox(root, yscrollcommand=scrollbar.set)
for line in range(100):
    mylist.insert(END, "This is line number " + str(line))
mylist.pack(side=LEFT, fill=BOTH)

scrollbar.config(command=mylist.yview)
mainloop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» ListBox