【发布时间】:2021-01-16 17:47:05
【问题描述】:
在 Tkinter(使用 Ttkthemes)中单击按钮后,如何删除虚线黑色边框?
我使用的是 Windows 10,Python 3.7.9。
似乎没有统一的方法来删除它,我在 Google 和 SO 上进行了搜索,但没有运气。谢谢。 这是一个最小的例子:
import tkinter
import tkinter.ttk
from ttkthemes import ThemedTk
tk = ThemedTk(theme="arc")
tk.configure(background="#f5f6f7")
tk.resizable(0,0)
selectFileInput = tkinter.ttk.Button(
tk,
text="Select Input File"
)
selectFileInput.place(x=20,y=60)
tk.mainloop()
【问题讨论】:
-
我从来没有注意到这一点。请告诉我们minimal reproducible example。另外,您使用的是什么操作系统?
-
我已经用更多信息和一个最小的例子更新了这个问题。
-
这个
inputSelected这个命令在哪里 -
您的示例不完整。我无法运行它并重现您的错误。
-
对不起,我删除了一些不需要的功能。现在它应该可以毫无问题地运行。 ttkthemes 模块是必需的。
标签: python tkinter tkinter-button