Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Tkinter Scrollbar Widget

from tkinter import *
w = Tk()
scrollbar = Scrollbar(w)
scrollbar.pack( side = RIGHT, fill = Y )
mylist = Listbox(w, yscrollcommand = scrollbar.set )
for line in range(50):
   mylist.insert(END, 'This is Python Tutorial' + str(line))
mylist.pack( side = LEFT, fill = BOTH)
scrollbar.config( command = mylist.yview )
mainloop()
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #Tkinter #Scrollbar #Widget
ADD COMMENT
Topic
Name
3+5 =