Open Jodus-Melodus opened 2 weeks ago
It's possible. One of the examples they provided (complex_example.py) let you change light, dark, and system theme while the app is running.
Yes thank you.
But I want to switch between custom themes. Themes that I created in a separate json file myself.
I'm actually trying custom theme myself. You can read more here: https://customtkinter.tomschimansky.com/documentation/color/
Thank you!
See, I'm working on an application with a separate settings.json file that handles all the settings including the theme. The user can change it while it is running and I want to update the theme accordingly.
I'm using this to set the theme when the application is being initialized, but it doesn't work when I use it to update the theme while the program is running.
ctk.set_default_color_theme(f"Themes/{settings['theme']}/theme.json")
settings = {
"theme": "name of the theme"
}
When you use set_default_color_theme, you'll have to reopen the app for it to take effect (that's just how the function works). Maybe there are other workarounds but it's pretty complex.
Yeah, I noticed. Thank you.
Can I update or change the default theme while the program is running?
It could be a nice feature if there isn't such a feature.