问题描述
我正在尝试将只读组合的颜色变成白色作为非只读组合
我的只读组合代码
Combo myCombo = new Combo(sessionProperties, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY, "");
我也尝试设置背景和前景,但不是这个东西.
如果您认为值得付出努力,您仍然可以使用 CCombo
小部件作为模板来构建您自己的全白组合框.
I'm trying to turn color of my readonly combo to white as a non-readonly combo
My code for the readonly Combo
Combo myCombo = new Combo(sessionProperties, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY, "");
I also try to set background and foreground, but it not this thing.
The background color is a hint. On some platforms, some controls cannot change their background color.
The SWT CCombo
is a custom control that emulates the behavior of a combo box by using a text input field, a button, and a list.
Setting the background to white changes the text and list background color only. Not sure if that is what you were looking for.
If you think it's worth the effort you can still use the CCombo
widget as a template to build your own all-white combo box.
这篇关于为 SWT Combo 设置颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!