Answers for "custom scrollbar tkinter"

2

custom scrollbar tkinter

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()
Posted by: Guest on May-29-2020

Code answers related to "custom scrollbar tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language