python - Why am i getting the error that "System (2).py", line 14, in <module> BottomFrame(side = BOTTOM) TypeError: 'Frame' object is not callable" -
from tkinter import* tkinter import tk, stringvar, ttk import random import datetime root = tk() root.geometry("1350x750+0+0") root.title ("stock control system") topframe = frame(root, width = 1350, height = 100, bd = 14, relief = 'raise') topframe.pack(side = top) bottomframe = frame(root, width = 1350, height = 200, bd = 20, relief = 'raise') bottomframe(side = bottom) leftmidframe = frame(bottomframe, width = 600, height = 1000, bd = 14, relief = 'raise') leftmidframe(side = left) rightmidframe = frame(root, width = 750, height = 1000, bd = 14, relief = 'raise') rightmidframe(side=right) lbltitle = label(topframe, font('arial',40,'bold'), text = "stock control system", bd = 10, width = 41, justify = 'center') lbltitle.grid(row=0,column=0)
why getting error "frame" not callable? supposed stock management system reason not working...
this because instances of frame
objects , not functions. hence, not callable. need call .pack
on each frame
instance, did topframe
. example:
bottomframe = frame(root, width = 1350, height = 200, bd = 20, relief = 'raise') bottomframe.pack(side = bottom)
furthermore, there =
missing in second last line. must read
lbltitle = label(topframe, font=('arial',40,'bold'), text = "stock control system", bd = 10, width = 41, justify = 'center')
Comments
Post a Comment