Tkinter:删除活动按钮突出显示
Tkinter: Remove active button highlight
在 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()
我找到了解决方案。它是创建一个虚拟按钮并将其聚焦以通过使用 dummy.focus()
将焦点从按钮移至虚拟按钮
在 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()
我找到了解决方案。它是创建一个虚拟按钮并将其聚焦以通过使用 dummy.focus()