Jump to content

Performing mathematical operations such as Excel


Recommended Posts

Hey Latif if you don't get along with Tables in the GUI. Just create a tkinter-subscript that does a table. Then do your math on the needed variables and fill them into the tkinter table. 

Link to comment
Share on other sites

  • 3 weeks later...

Hi there, so this would be a simple 3 by 3 spreadsheet in tkinter:


import tkinter as tk
from tkinter import ttk
def main():
    root = tk.Tk()
    tree_frame = ttk.Frame(root, relief="solid",borderwidth=2)
    tree = ttk.Treeview(tree_frame, columns=("col1", "col2", "col3"), show="headings")
    tree.heading("col1", text="Column 1")
    tree.heading("col2", text="Column 2")
    tree.heading("col3", text="Column 3")
    for i in range(3😞
        tree.insert("", "end", values=(f"Row {i+1}, Col 1", f"Row {i+1}, Col 2", f"Row {i+1}, Col 3"))
    tree.pack(expand=True, fill='both')
if __name__ == '__main__':
Link to comment
Share on other sites


  • Create New...