简体   繁体   中英

App logo for python tkinter window

I want to have a file.ico file that I want to put as my logo for the application. It is similar to favicon in html.

This is the ending code:

root = Tk()
root.title("Blacky Birds")
root.resizable(0,0)
root.configure(bg="forestgreen")
game = SqBoard(root, width=16, height=16, letters=10)
game.mainloop()

I am not sure but an guessing that it will be in this part of my file. Should be a one liner like root.icon(PhotoImage(file.ico)) or something similar. Please help me out. I am using Python 3.4.2 with Tkinter as Gui. Many thanks in advance.

root.iconbitmap('favicon.ico')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM