Eclipse E4 CSS: swt-background-mode

  • Posted on: 23 October 2015
  • By: Nate Jones

I couldn't find this well documented anywhere, although I did find a few examples. If you want to set a composite's background mode using the Eclipse E4 CSS you can use the CSS property swt-background-mode like this:

  1.     #MyCompositesId {
  2.       swt-background-mode: default;
  3.       background-color: gray;
  4.     }

According to a commit message in the eclipse git repository, these are the available values.

  • 'none' is SWT.INHERIT_NONE
  • 'force' is SWT.INHERIT_FORCE
  • 'default' is SWT.INHERIT_DEFAULT
Tags: