Python Forum
TypeError: 'Table' object is not callable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: 'Table' object is not callable
#18
something like
from tkinter import *
 
# Create Window Object
window = Tk()
# Define table contents (each row/column)
l1 = Label(window, text="Name")
l1.grid(row=0, column=0)

# Define Entries
name_text = StringVar()
e1 = Entry(window, textvariable=name_text)
e1.grid(row=0, column=1)
 
l2 = Label(window, text="Monthly Income")
l2.grid(row=0, column=2)

Monthly_Income_text = StringVar()
e2 = Entry(window, textvariable=Monthly_Income_text)
e2.grid(row=0, column=3)
 
l3 = Label(window, text="Monthly Budget")
l3.grid(row=1, column=0)


Monthly_Budget = StringVar()
e3 = Entry(window, textvariable=Monthly_Budget)
e3.grid(row=1, column=1)
 
l4 = Label(window, text="Monthly Expenses")
l4.grid(row=1, column=2)
 
 
Monthly_Expenses = StringVar()
e4 = Entry(window, textvariable=Monthly_Expenses)
e4.grid(row=1, column=3)
 
# Define ListBox
list1 = Listbox(window)
list1.grid(row=3, column=0, rowspan=4, sticky=E+W)
 
# Attach scrollbar to the list
sb1 = Scrollbar(window)
sb1.grid(row=3, column=1, rowspan=4, sticky=N+S)
 
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=2, columnspan=2, sticky=N+E+S+W)
 
b2 = Button(window, text="Search Entry", width=12)
b2.grid(row=3, column=2, columnspan=2, sticky=N+E+S+W)
 
b3 = Button(window, text="Add Entry", width=12)
b3.grid(row=4, column=2, columnspan=2, sticky=N+E+S+W)
 
b4 = Button(window, text="Update Selected", width=12)
b4.grid(row=5, column=2, columnspan=2, sticky=N+E+S+W)
 
b5 = Button(window, text="Delete Selected", width=12)
b5.grid(row=6, column=2, columnspan=2, sticky=N+E+S+W)
 
b6 = Button(window, text="Close", width=12)
b6.grid(row=7, column=2, columnspan=2, sticky=N+E+S+W)
 
window.mainloop()
   

Far from good but better than the initial one. play with the grid manager to refine t
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: TypeError: 'Table' object is not callable - by buran - Jan-21-2020, 09:47 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020