CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Image in label doesn't get rendered

Open emilkevinmanuel opened this issue 3 years ago • 3 comments

customtkinter.CTkLabel(master=boxframe,image=ImageTk.PhotoImage(Image.open("LogoText.png"))).pack(padx=0, pady=10)

The Image is invisible, but the label is there. Where my image should be is a gap with the size of my image. I also don't get an error. Screenshot 2022-10-26 185508

emilkevinmanuel avatar Oct 26 '22 16:10 emilkevinmanuel

You can replace it with the CTkButton with fg_color=None, hover=False, text="", image=ImageTk.PhotoImage(Image.open("LogoText.png")

Akascape avatar Oct 26 '22 17:10 Akascape

Thanks :) @Akascape

emilkevinmanuel avatar Oct 26 '22 17:10 emilkevinmanuel

You need to set text="" for the CTkLabel to display the image correctly.

TomSchimansky avatar Oct 28 '22 08:10 TomSchimansky

Should work fine now.

TomSchimansky avatar Nov 30 '22 23:11 TomSchimansky