Set color for SWT Combo

I am trying to turn the color of my readonly combo to white as a non-readonly combo enter image description here

My code for readonly Combo

Combo myCombo = new Combo(sessionProperties, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY, "");

      

I am also trying to set the background and foreground, but that is not this thing. enter image description here

+2


source to share


1 answer


background color is a hint . On some platforms, some controls cannot change the background color.

SWT CCombo

is a custom control that emulates the behavior of a combo box using a text input box, button, and list box.

Setting the background to white only changes the text and the list of background colors. Not sure if this is what you were looking for.



enter image description here

If you think it's worth it, you can still use the widget CCombo

as a template to create your own all-white combo box.

+3


source







All Articles