Open Pitoche opened 3 weeks ago
Working on this `import customtkinter as ct from customtkinter import *
ct.set_appearance_mode("light") ct.set_default_color_theme("dark-blue")
main_window = CTk() main_window.geometry("600x400+250+200") main_window.title("CTkswitch")
def changeMode(): val=switch.get() if val: ct.set_appearance_mode("dark") else: ct.set_appearance_mode("light")
switch = CTkSwitch(main_window, text="Dark Mode", onvalue=1, offvalue=0, command=changeMode) switch.pack(pady=20) print(switch.get())
main_window.mainloop()`
Add toggle option to chnage app's theme dark/light