如何更改组合框 ListView 的样式?
这是目前为止的部分代码:
style = ttk.Style()
style.configure("BW.TLabel", foreground="black", background="#20252b",
insertbackground="white", fieldbackground= 'blue')
optmn = ttk.Combobox(self, style="BW.TLabel")
optmn.place(x=140, y=200, width=150, height=25)
如何访问组合框 ListView 的样式?
示例图片:
最佳答案
找到了!更改combobox的listview的BG的方法是:
import ttk
import Tkinter
root = Tkinter.Tk()
root.option_add("*TCombobox*Listbox*Background", 'green')
combo = ttk.Combobox().pack()
root.mainloop()
关于python - 如何更改 ttk.Combobox ListView 中的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31545559/