I want to display 500+ entries in a TreeView. The following is the code that I wrote:
import tkinter.ttk as ttk
from tkinter import *
#entries is a list of lists containing the data I want to display
master = Tk()
tree = ttk.Treeview(master, columns=('Name', 'Quiz 1', 'Quiz 2', 'MidSem'))
tree.heading('#0', text='ID')
tree.heading('#1', text='Name')
tree.heading('#2', text='Quiz 1')
tree.heading('#3', text='Quiz 2 ')
tree.heading('#4', text='MidSem')
tree.column('#1', stretch=YES)
tree.column('#2', stretch=YES)
tree.column('#3', stretch=YES)
tree.column('#4', stretch=YES)
tree.column('#0', stretch=YES)
tree.pack(fill=BOTH)
for entry in entries:
tree.insert('', 'end', text=entry[0], values=(entry[1], entry[2], entry[3], entry[4]))
When I run this code, it seems that I can only see 10 rows of data, even if I resize the window and I'd like to see more than 10 rows of data. How do I increase the number of rows displayed in this?