user3486991
user3486991

Reputation: 463

spreadsheet-like-app in tkinter?

Suppose one were to want to build a spread-sheet in tkinter. So one could have (many) cells, most of which would take text entry, but some could be drop-down lists (tkinter comboboxes) etc.

Is that feasible in tkinter for a spreadsheet of any size? (Say 100x10)? Or would that many tkinter Text object and comboboxes etc just be too much handle performance wise? (Or is there some other way to do this other than just gridding many tkinter objects?)

I ask not because I want to do this literally, but because I need to build an app in which users are presented with lots of chunks of information, any of them editable. It's convenient for the user to access those chunks directly (click on the cell) rather than have to pass through some preliminary interface.

Upvotes: 5

Views: 2695

Answers (1)

j_4321
j_4321

Reputation: 16169

I think the best way to know is to try. I used the code below to create a 100x10 grid of Entry widgets and tkinter did not seem slow once all widgets were created. But it will depend on the performances of the computer.

import tkinter as tk

root = tk.Tk()

for i in range(100):
    for j in range(10):
        tk.Entry(root)).grid(row=i, column=j)

root.mainloop()

Upvotes: 8

Related Questions