Tkinter-如何从ttk.Button中删除背景边框?

问题描述

认情况下,ttk模块中的按钮有一个像素边框。如何删除该边框?下面的示例代码

from tkinter import *
from tkinter import ttk

root = Tk()
root.geometry("400x300")

style=ttk.Style()
style.configure("TButton",padding=0,background="#ffffff") # I colored the background border white to see it in the window.. but,I don't want it,I want to delete the border!

MyButton = ttk.Button(root,text="I have a white border.. how can I delet it?")
MyButton.place(x=16,y=16)

root.mainloop()

我不想更改边框颜色以将其隐藏在窗口中,我想删除它。

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)