I am trying to add an icon to my windows in python, I have got a .ico file, 16x16 in size, but when I run this script, the windows icon just looks like this: link, it doesn't show my custom icon. The .ico file is in the same location as the python file.
Here is my code:
import sys
import os
import tkinter as tk
c = 650
window = tk.Tk()
back = tk.Frame(width=700, height=c)
back.pack()
window.title("Notifications")
window.iconbitmap("image.ico")
window.mainloop()
How do I get my icon to show up properly on the window?
Use an image converter. You shouldn't rename the extension of the file to
.ico. You can use an online converter too, there are many.