在Tkinter中单击按钮(使用TTK选项)后,如何删除黑色虚线边框?
我使用的是Windows10,Python 3.7.9
似乎没有统一的方法来删除它,我在谷歌上搜索,所以没有运气。谢谢 下面是一个简单的例子:
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()
创建一个虚拟按钮并对其进行聚焦,从而将焦点从按钮移到虚拟按钮相关问题 更多 >
编程相关推荐