|
Re: How to customize the background color of controls for entering Boolean values generated by EMFFo [message #1463308 is a reply to message #1462239] |
Thu, 06 November 2014 07:30  |
Eclipse User |
|
|
|
Hi,
have you tried how a check button with background set to grey looks
outsite of EMF Forms, meaning on a plain shell? Does it work as expected
there?
Best regards
Jonas
Am 05.11.2014 12:04, schrieb Dmitri Pisarenko:
> Hello!
>
> I have an EMF model, from which I generated UI form and embedded it into
> a wizard.
>
> The check boxes appear with white background (see below) and it doesn't
> look nice.
>
>
>
> How can I change the background color of the check box (avoid the white
> strip) ?
>
> I tried to use BooleanControlSWTRenderer sub-class (see below), but it
> didn't work.
>
> public class MyRenderer extends BooleanControlSWTRenderer {
>
> @Override
> protected Control createSWTControl(Composite parent, Setting
> setting) {
>
>
> final Button check = new Button(parent, SWT.CHECK);
>
> check.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_GRAY));
> check.setData(CUSTOM_VARIANT,
> "org_eclipse_emf_ecp_control_boolean"); //$NON-NLS-1$
>
> return check;
>
> }
> }
>
> Thanks in advance
>
> Dmitri
|
|
|
Powered by
FUDForum. Page generated in 0.06176 seconds