How to change icon #1099
Replies: 9 comments 21 replies
-
|
Hello, I had the same issue, I had this "fix" for it:
I hope someone will provide a better solution |
Beta Was this translation helpful? Give feedback.
-
|
If you use the latest version there should be no problem. |
Beta Was this translation helpful? Give feedback.
-
|
@IAminos Thanks a lot, that was the only method that worked! |
Beta Was this translation helpful? Give feedback.
-
|
This issue still effects CTkToplevel, using the suggestion from IAminos solved my issue. thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone gotten this to cooperate on macOS? I made sure the latest version of CustomTkinter is running. Using the regular |
Beta Was this translation helpful? Give feedback.
-
|
Try this method:
import os
from PIL import ImageTk
...
self.iconpath = ImageTk.PhotoImage(file=os.path.join("assets","logo.png"))
self.wm_iconbitmap()
self.iconphoto(False, self.iconpath)
self.wm_iconbitmap()
self.after(300, lambda: self.iconphoto(False, self.iconpath)) |
Beta Was this translation helpful? Give feedback.
-
|
import customtkinter as ctk class App(ctk.CTkFrame): root = ctk.CTk() This worked for me (KDK) |
Beta Was this translation helpful? Give feedback.
-
|
Something like this: # Importing required module
import customtkinter as ctk
# Selecting GUI theme : dark,light , system (for system default)
ctk.set_appearance_mode("system")
# Selecting color theme-blue, green, dark-blue
ctk.set_default_color_theme("dark-blue")
app = ctk.CTk()
app.geometry("400x400")
app.title("Modern Login UI using Customtkinter")
openstack_icon = app.iconbitmap('openstack.ico') |
Beta Was this translation helpful? Give feedback.
-
|
For who have tried the solutions above, but still have the problem (the solutions only work when you run the code, not when create an exe). Use this in your code Something like that Save the code and get your And then, finally put your ↑ Should work with relative and absolute path |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hey Tom, hello. How can i change the default window icon? I tried a lot of regular tkinter methods
unsuccessfully. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions