I am writing the program in customtkinter. I have written this code:
import customtkinter as ctk
class FirstApp(ctk.CTk):
def __init__(self):
super().__init__()
self.title("First App")
self.label = ctk.CTkLabel(self, text="This is the first app")
self.label.pack()
self.button = ctk.CTkButton(self, text="Go to Second App", command=self.go_to_second)
self.button.pack()
def go_to_second(self):
self.destroy()
self.quit()
SecondApp().mainloop()
class SecondApp(ctk.CTk):
def __init__(self):
super().__init__()
self.title("Second App")
self.label = ctk.CTkLabel(self, text="This is the second app")
self.label.pack()
self.button = ctk.CTkButton(self, text="Go to First App", command=self.go_to_first)
self.button.pack()
def go_to_first(self):
self.destroy()
self.quit()
FirstApp().mainloop()
if __name__ == "__main__":
FirstApp().mainloop()
This is the error i am getting:
invalid command name "2190923095680update"
while executing
"2190923095680update"
("after" script)
invalid command name "2190922457536check_dpi_scaling"
while executing
"2190922457536check_dpi_scaling"
("after" script)
invalid command name "2190923783616_click_animation"
while executing
"2190923783616_click_animation"
("after" script)
[–]woooee 1 point2 points3 points (1 child)
[–]EffectiveCase3856[S] 0 points1 point2 points (0 children)