Note: The following examples assume that you have first set the tab-renderer to use CTabRendering (see the tab-renderer CSS property in the CTabFolder table above)

+

<table cellpadding="5" border="1">

+

<tr>

+

<th>e4Renderer Method</th>

+

<th>CSS Property Name</th>

+

<th>CSS Example</th>

+

</tr>

+

+

<tr>

+

<td>setOuterKeyline(Color)</td>

+

<td>swt-outer-keyline-color</td>

+

<td>CTabFolder {

+

swt-outer-keyline-color: #B6BCCC; }</td>

+

</tr>

+

+

<tr>

+

<td>setCornerRadius(int)</td>

+

<td>swt-corner-radius</td>

+

<td>CTabFolder {

+

swt-corner-radius: 20; }</td>

+

</tr>

+

+

<tr>

+

<td>setShadowVisible(boolean)</td>

+

<td>shadow-visible</td>

+

<td>CTabFolder {

+

shadow-visible: false; }</td>

+

</tr>

+

+

<tr>

+

<td>setShadowColor(Color)</td>

+

<td>shadow-color</td>

+

<td>CTabFolder {

+

shadow-color: #F79402; }</td>

+

</tr>

+

+

<tr>

+

<td>setSelectedTabFill(Color)</td>

+

<td>selected-tab-fill</td>

+

<td>CTabFolder {

+

selected-tab-fill: #F79402; }</td>

+

</tr>

+

+

<tr>

+

<td>setTabOutline(Color)</td>

+

<td>tab-outline</td>

+

<td>CTabFolder {

+

tab-outline: #F79402; }</td>

</tr>

</tr>

Line 179:

Line 264:

<tr>

<tr>

<td>Control</td>

<td>Control</td>

−

<td>:focus</td>

+

<td>:focus †</td>

−

<td>CTabFolder:focus { background-color: ##FF0000; }

+

<td>CTabFolder:focus { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>Control</td>

<td>Control</td>

<td>:visible †</td>

<td>:visible †</td>

−

<td>Shell:visible { background-color: ##FF0000; }

+

<td>Shell:visible { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>Control</td>

<td>Control</td>

<td>:enabled †</td>

<td>:enabled †</td>

−

<td>Text:enabled { background-color: ##FF0000; }

+

<td>Text:enabled { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>Control</td>

<td>Control</td>

<td>:disabled †</td>

<td>:disabled †</td>

−

<td>Text:disabled { background-color: ##FF0000; }

+

<td>Text:disabled { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>Shell</td>

<td>Shell</td>

<td>:active</td>

<td>:active</td>

−

<td>Shell:active { background-color: ##FF0000; }

+

<td>Shell:active { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>Button</td>

<td>Button</td>

<td>:checked</td>

<td>:checked</td>

−

<td>Button:checked { background-color: ##FF0000; }

+

<td>Button:checked { background-color: #FF0000; }

</tr>

</tr>

<tr>

<tr>

<td>CTabFolder</td>

<td>CTabFolder</td>

<td>:selected</td>

<td>:selected</td>

−

<td>CTabFolder:selected { background-color: ##FF0000; }

+

<td>CTabFolder:selected { background-color: #FF0000; }

</tr>

</tr>

+

<tr>

<td>CTabItem</td>

<td>CTabItem</td>

<td>:selected</td>

<td>:selected</td>

−

<td>CTabItem:selected { background-color: orange; }

+

<td>CTabItem:selected { font-weight: bold; }

</tr>

</tr>

</table>

</table>

<br>

<br>

† As of yet styles are only applied when SWT UI is initially loaded, if widget state is changed afterwards, changes will not take effect

† As of yet styles are only applied when SWT UI is initially loaded, if widget state is changed afterwards, changes will not take effect

Revision as of 00:44, 2 October 2012

Many SWT property setting methods can be accessed via CSS. These tables show the equivalent mapping from SWT method to CSS property. They also show pseudo selectors which can be used to choose styling based on widget state.