【发布时间】:2014-09-24 23:05:33
【问题描述】:
我创建了一个 python GUI 应用程序。它工作得很好,我已经根据自己的喜好设置了所有样式,除了 ComboBox。 ttk.Combobox 上的样式似乎不起作用。
这应该可以让我了解我想要的材料风格。这是组合框的样式块。
globalStyle = ttk.Style()
globalStyle.configure('TCombobox', foreground=textColor, background=backgroundColor, fieldbackground=selectColor, fieldforeground=textColor, font='Verdana')
我唯一能够成功更改的是文本和前景色。我正在寻找编辑以下属性:
文字颜色 领域背景 下拉文本颜色 下拉背景
编辑:我应该提到使用的颜色变量都是有效的十六进制颜色代码。
selectColor = '#333333'
backgroundColor = '#444444'
foregroundColor = '#555555'
textColor = '#999999'
【问题讨论】:
-
我还没有找到这个问题的满意答案。我到处搜索,找不到您正在寻找的确切答案。如果您自己找到了答案,如果您能发布它,那就太好了。