Tkinter - How can I remove the background borders from ttk.Button?

时光怂恿深爱的人放手 提交于 2021-02-11 06:35:35

问题


by default, the buttons from ttk module, have a one pixel border. how can I delete this border? below an example code:

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()

I don't want to change the border color in order to hide it in the window,I want to delete it.

来源:https://stackoverflow.com/questions/64226607/tkinter-how-can-i-remove-the-background-borders-from-ttk-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!