2024-04-29 13:40:32 发布
网友
Human Interface Guidelines描述了一个与众不同的帮助按钮,它的设计与普通的tkinter按钮不同。我的问题很简单,我能在tkinter中创建这个按钮吗?我查看了effbot上的tkinter文档,但什么也没找到
您可以制作一个按钮,在其上放置一个问号图像,并将边框设置为0
举个例子:
from tkinter import * root = Tk() root.config(bg="light grey") helpim = PhotoImage(file="help.gif") help = Button(root, bd=0, bg="light grey") help["activebackground"] = "light grey" help.config(image=helpim) help.pack() root.mainloop()
这是我使用的问号图像:
您可以为按钮分配一个命令,以将帮助显示为dialog message box。 输出:
您可以制作一个按钮,在其上放置一个问号图像,并将边框设置为0
举个例子:
这是我使用的问号图像:
您可以为按钮分配一个命令,以将帮助显示为dialog message box。
输出:
相关问题 更多 >
编程相关推荐