我正在尝试更改我的Tkinter应用程序的背景颜色,但对于某些小部件,它会在边缘留下白色边框.
例如,这个:
from tkinter import *
COLOR = "black"
root = Tk()
root.config(bg=COLOR)
button = Button(text="button", bg=COLOR)
button.pack(padx=5, pady=5)
entry = Entry(bg=COLOR, fg='white')
entry.pack(padx=5, pady=5)
text = Text(bg=COLOR, fg='white')
text.pack(padx=5, pady=5)
root.mainloop()
Run Code Online (Sandbox Code Playgroud)
如何设置某些Tkinter小部件的边框颜色?