'Limited amount of data entries displayed in Tkinter table
I'm currently creating database for a school with 90 students. When testing out the function that displays all database entries in a table, I've found that only 10 entries can be displayed in the table at one time. Is there any way I can extend or remove this limit?
def DataTable():
def View():
for row in db_actions.GetAllStudents():
print(row)
tree.insert("", tk.END, values = row)
tree = ttk.Treeview(TableView, column=("c1", "c2", "c3", "c4"), show='headings')
tree.column("#1", anchor='center')
tree.heading("#1", text="Number")
tree.column("#2", anchor='center')
tree.heading("#2", text="First name")
tree.column("#3", anchor='center')
tree.heading("#3", text="Surname")
tree.column("#4", anchor='center')
tree.heading("#4", text="Class")
tree.pack()
View()
DataTable()
The role of
for row in db_actions.GetAllStudents():
is to retrieve data from a database in another program. I have tested this and the issue is unlikely to be database-related due to the program working perfectly when there's less than 10 entries.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
