Changing Window Icon in Tkinter

8.03.2011 | Python

Tkinter is the most commonly used GUI programming toolkit for python

Here is how you can change the program icon in tkinter

#instantiate tkinter
root=gui.Tk()
#change the window icon to be window.ico
#this works on windows for linux icon files shall be .xpm
root.iconbitmap('window.ico')
root.mainloop()

Where window.ico is the icon file you want to use instead of the default tkinter logo

You can convert ico to xpm using GIMP

Be Sociable, Share!

Comments