【发布时间】:2011-05-18 06:28:25
【问题描述】:
我正在尝试更改我的 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()
如何设置某些 Tkinter 小部件的边框颜色?
【问题讨论】:
标签: python colors tkinter tcl border