繁体   English   中英

python tkinter窗口的应用徽标

[英]App logo for python tkinter window

我想要有一个file.ico文件,我想将其作为应用程序的徽标。 它类似于html中的favicon。

这是结束代码:

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()

我不确定,但是我猜这将在文件的这一部分。 应该是像root.icon(PhotoImage(file.ico))或类似的东西。 请帮帮我。 我正在将Tkinter作为Gui使用Python 3.4.2。 提前谢谢了。

root.iconbitmap('favicon.ico')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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