Jan-21-2020, 07:41 PM
Hi, I've been trying to make a GUI interface which is updatable and connected to SQLite however I'm receiving the following error:
TypeError: 'Table' object is not callable
It may be a stupid error but I'm below even a novice with this kinda stuff so any help would be greatly appreciated to get the program working again! :)
TypeError: 'Table' object is not callable
It may be a stupid error but I'm below even a novice with this kinda stuff so any help would be greatly appreciated to get the program working again! :)
from msilib.schema import ListBox from tkinter import * from matplotlib.pyplot import grid # Create Window Object window = Tk() # Define table contents (each row/column) l1 = Label(window, text="Name") l1.grid(row=0, column=0) l1 = Label(window, text="Monthly Income") l1.grid(row=1, column=0) l1 = Label(window, text="Monthly Budget") l1.grid(row=2, column=0) l1 = Label(window, text="Monthly Expenses") l1.grid(row=3, column=0) # Define Entries name_text = StringVar() e1 = Entry(window, textvariable=name_text) e1.grid(row=0, column=1) Monthly_Income_text = StringVar() e2 = Entry(window, textvariable=Monthly_Income_text) e2.grid(row=0, column=2) Monthly_Budget = StringVar() e3 = Entry(window, textvariable=Monthly_Budget) e3.grid(row=0, column=3) Monthly_Expenses = StringVar() e4 = Entry(window, textvariable=Monthly_Expenses) e4.grid(row=0, column=4) # Define ListBox list1 = ListBox(window, height=35, width=35) list1.grid(row=2, column=0, columnspan=2) # Attach scrollbar to the list sb1 = Scrollbar(window) sb1.grid(row=2, column=2, rowspan=6) list1.configure(yscrollcommand=sb1.set) sb1.configure(command=list1.yview) # Define buttons b1 = Button(window, text="View All", width=12) b1 = grid(row=2, column=3) b1 = Button(window, text="Search Entry", width=12) b1 = grid(row=3, column=3) b1 = Button(window, text="Add Entry", width=12) b1 = grid(row=4, column=3) b1 = Button(window, text="Update Selected", width=12) b1 = grid(row=5, column=3) b1 = Button(window, text="Delete Selected", width=12) b1 = grid(row=6, column=3) b1 = Button(window, text="Close", width=12) b1 = grid(row=7, column=3) window.mainloop()