5

I just trying to change the Logo of my Python Tkinter GUI, right now it is displayed as "Tk" at top left corner Somebody please tell me how to change this and write something custom names

1 Answer 1

13

Just do this with your root :

root.wm_iconbitmap('myicon.ico')

Here is a small example:

from Tkinter import *
root = Tk()
root.wm_iconbitmap('myicon.ico')
root.wm_title('Title')
root.mainloop()
4
  • Hi @Ajain if this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this.
    – Alok
    May 21, 2014 at 6:50
  • Thank you very much but I am stuck with following error TclError: bitmap "c:/Proj/Images/MyPic1.bmp" not defined
    – Ajain
    May 21, 2014 at 6:58
  • 1
    Accroding to this & this only .ico or .icr files are supported.
    – Alok
    May 21, 2014 at 7:05
  • glad to be of some help :)
    – Alok
    May 21, 2014 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.