[La...] Posted December 21, 2022 Share Posted December 21, 2022 Hello everyone, Is it possible to perform mathematical operations as seen in the example in the picture? Link to comment Share on other sites More sharing options...
[Na...] Posted December 21, 2022 Share Posted December 21, 2022 Hello Latif, you can insert an expression with a right click and calculate inside it. Regards, Nanno Link to comment Share on other sites More sharing options...
[La...] Posted December 21, 2022 Author Share Posted December 21, 2022 Hi Nanno, How do we define rows and columns? For example; How do I define a box named 1 and a box named 2? Link to comment Share on other sites More sharing options...
[Da...] Posted December 22, 2022 Share Posted December 22, 2022 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 More sharing options...
[La...] Posted December 24, 2022 Author Share Posted December 24, 2022 Hello, Can you make a sample code? Link to comment Share on other sites More sharing options...
[Da...] Posted January 11, 2023 Share Posted January 11, 2023 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') tree_frame.pack() root.mainloop() if __name__ == '__main__': main() Link to comment Share on other sites More sharing options...
[Da...] Posted January 11, 2023 Share Posted January 11, 2023 Edit: I don't know how that emoji sneaked into the code but it should be: for i in range (3): Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in