Icon at the top of a window

-2

I need to change the icon in the left corner of a window that I created, the code I have as an example is the following, but it does not work:

objeto.tk.call("icone.ico");

How can I do this?

    
asked by anonymous 01.12.2017 / 20:09

1 answer

1

You should use the method iconbitmap

import Tkinter

window = Tkinter.Tk()
window.iconbitmap('CAMINHO_COMPLETO_PARA_O_ICON/ICON.ICO')
window.mainloop()

Reference

02.12.2017 / 03:01