I made an UI using customtkinter, but I have an issue with it not changing the frame.
class MainFrame(customtkinter.CTkFrame):
def __init__(self, master):
super().__init__(master)
self.grid_columnconfigure(0, weight=1)
self.grid_rowconfigure(0, weight=1)
self.active_users_frame = ActiveUsers(self)
self.login_frame = Login(self)
print("Hello from MainFrame")
def show_frame(self, value):
print(f"Hello From {value}")
generate_frames(self.active_users_frame, self.login_frame, value)
class App(customtkinter.CTk):
def __init__(self):
super().__init__()
self.title("PE Gear Manager")
customtkinter.set_appearance_mode("light")
self.grid_columnconfigure(0, weight=1)
self.grid_rowconfigure((0, 1, 2), weight=1)
self.main_frame = MainFrame(self)
self.main_frame.grid(row=2, column=0, sticky="nswe")
self.main_frame.show_frame("Active Users")
self.line_separator = LineSeparator(self)
self.line_separator.grid(row=1, column=0, sticky="nwe")
self.main_menu = MenuFrame(self)
self.main_menu.grid(row=0, column=0, padx=5, pady=(10, 0), sticky="nwe")
app = App()
app.mainloop()