How to use newly created them #14
-
Hello All, I am new to ctktkinter, I want built application with newly created them. Please provide guide how should i create new them and save to folder and use in application. Provide any example will be good. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @sandipsable506. There are videos on YouTube which should help you to find your way around CTk Theme Builder. I would suggest you watch:
That should get you started in respect of creating your themes. To include it in your CustomTkinter app, then you need to place the theme (json) file in a folder, where your application can access it.
Note however, that you can only select one of the 3 CustomTkinter themes by a simple name reference. When using bespoke themes, CustomTkinter expects you to provide the pathname to the file. Arbitrary example:
You should call set_default_color_theme(theme_path) before you call CTk(). If you want to practice, without building a whole app, just download simple_example.py. You can then take a newly created theme file, and modify your copy of simple_example.py, so that it points to where you place your bespoke theme. There are also a few bespoke themes supplied with CTk Theme Builder, so you could try it with one of those. Of course, this is a simplified solution. I normally provide a preferences dialogue in my applications, where the user can select the desired theme, and it get's stored for the application to look-up, when it next starts up. |
Beta Was this translation helpful? Give feedback.
Hi @sandipsable506.
There are videos on YouTube which should help you to find your way around CTk Theme Builder. I would suggest you watch:
That should get you started in respect of creating your themes.
Once you have created a theme, then by default, it will be stored in a user_themes folder, which sits inside the ctk_theme_builder root folder.
To include it in your CustomTkinter app, then you need to place the theme (json) file in a folder, where your application can access it.
Hopefully you have seen the command for selecting a theme. Typically it looks something like:
customtkinte…