I don't know why the error shows that it have 3 arguments. Anyone can help?
Traceback:
line 23, in __init__
frame = F(self, container)
TypeError: __init__() takes exactly 2 arguments (3 given)
Code:
class CGPACalculator(Tkinter.Tk):
def __init__(self, *args, **kwargs):
Tkinter.Tk.__init__(self, *args, **kwargs)
container = Tkinter.Frame(self)
container.pack(side="top", fill="both", expand=True)
container.grid_rowconfigure(0, weight=1)
container.grid_columnconfigure(0, weight=1)
self.frames = {}
for F in (Page1, Page2):
frame = F(self, container)
self.frames[F] = frame
frame.grid(row=0, column=0, sticky="nsew")
self.show_frame(Page1)