Home > Mobile >  Tkinter add icon to custom title-bar (overridden)
Tkinter add icon to custom title-bar (overridden)

Time:11-06

I want to create a custom Title-bar. But I have a problem with the icon. I want it to be left but instead it is just in the window... enter image description here

I have my template from here: https://github.com/Terranova-Python/Tkinter-Menu-Bar/blob/main/main.py

The code I tried to add the image:

from PIL import Image, ImageTk

img  = Image.open("M.ico") 
photo=ImageTk.PhotoImage(img)

close_button = Button(title_bar, text='  ×  ', command=root.destroy,bg=RGRAY,padx=2,pady=2,font=("calibri", 13),bd=0,fg='white',highlightthickness=0)
expand_button = Button(title_bar, text='            
  • Related