Reputation: 153
I'm running in circles on this one. I've checked a dozen posts and I'm not seeing what I've done wrong. Here's the code:
from tkinter import *
class Frame1(Frame):
def __init__(self, master):
#super().__init__()
self.lblTitle = Label(master, text="Ticket List")
self.lblTitle.grid(row=0, column=0)
self.listTickets = Listbox(master, width=20, height=20, font=("Arial", 11))
self.listTickets.grid(row=1, column=0)
self.scrollbar = Scrollbar(master, orient=VERTICAL)
self.scrollbar.grid(row=1, column=1)
self.listTickets.config(yscrollcommand=self.scrollbar.set)
self.scrollbar.config(command=self.listTickets.yview)
for i in range(1000):
self.listTickets.insert(END, str(i))
window = Tk()
window.title("Ticket System")
frame = Frame1(window)
window.mainloop()
Where have I gone wrong? This just creates a tiny up/down arrow and not a true scrollbar.
Upvotes: 0
Views: 151