删除 Tkinter 窗口上的 TK 图标 [英] Removing the TK icon on a Tkinter window

查看:78
本文介绍了删除 Tkinter 窗口上的 TK 图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从窗口的标题栏中删除 tkinter 图标

How to remove tkinter icon from title bar in it's window

推荐答案

在 Windows 上

第一步:

使用图标编辑器或像 rw-designer.将其另存为 transparent.ico.

Create a transparent icon using either an icon editor, or a site like rw-designer. Save it as transparent.ico.

第二步:

from tkinter import *

tk = Tk()
tk.iconbitmap(default='transparent.ico')
lab = Label(tk, text='Window with transparent icon.')
lab.pack()
tk.mainloop()

在 Unix 上

类似的东西,但使用 xbm 图标.

这篇关于删除 Tkinter 窗口上的 TK 图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆