Tkinter:删除活动按钮突出显示

2024-10-01 19:17:58 发布

您现在位置:Python中文网/ 问答频道 /正文

在Tkinter中单击按钮(使用TTK选项)后,如何删除黑色虚线边框? enter image description here

我使用的是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()

Tags: 方法importtkinter选项按钮tk边框虚线

热门问题