Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use methods for defining gradient on selected and non-selected CTabFolder items. For example</p> <pre><code>CTabFolder folder = new CTabFolder(shell, SWT.BORDER); folder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_YELLOW), display.getSystemColor(SWT.COLOR_RED)}, new int[]{100}, true); folder.setSelectionBackground(new Color[]{display.getSystemColor(SWT.COLOR_WHITE), display.getSystemColor(SWT.COLOR_BLUE)}, new int[]{100}, true); </code></pre> <p>will produces this (ugly) tabs</p> <p><img src="https://i.stack.imgur.com/UFugg.png" alt="colored SWT CTabFolder"></p> <p>So you just have to hit right colors which eclipse have..</p> <p>Or you could write your own <a href="http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/custom/CTabFolderRenderer.html" rel="noreferrer">CTabFolderRenderer</a> and set it to your CTabFolder instance.</p> <p><strong>EDIT</strong></p> <p>For Eclipse colors try</p> <pre><code>folder.setSelectionBackground(new Color[]{new Color(display, new RGB(242, 244, 247)), new Color(display, new RGB(157, 167, 195))}, new int[]{100}, true); </code></pre> <p><img src="https://i.stack.imgur.com/BysZq.png" alt="enter image description here"></p> <p><strong>EDIT</strong></p> <p>Found the way how to do it correctly</p> <pre><code>folder.setSelectionBackground(new Color[]{display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT), display.getSystemColor(SWT.COLOR_TITLE_BACKGROUND)}, new int[]{100}, true); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload