Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "E4/CSS/SWT Mapping"
Line 27: | Line 27: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td>Control<td> | + | <td>Control</td> |
<td></td> | <td></td> | ||
<td>border-width</td> | <td>border-width</td> |
Revision as of 10:23, 6 March 2009
How to style SWT widgets using CSS
SWT Widgets | SWT Method | CSS Property Name | CSS Example |
---|---|---|---|
Control | setBackground(Color) | background-color | Button { background-color: #FF0000 } |
Control | setBackgroundImage(Image) | background-image | Button { background-image: some url } |
Control | border-color | Button { border-color: ##FF0000; } | |
Control | border-width | Button { border-width: 3 } | |
Control | border-style | Button { border-style: dotted } | |
Control | setCurosr(Cursor) | cursor | Shell { cursor:crosshair } |
Control | setFont(Font) | font-style font-size |
Label { font-style: italic; font-size: 12; |
Control | setForeground(Color) | color | Button { color: #FF0000 } |
CTabFolder | setBorderVisible(Boolean) | border-visible | CTabFolder { border-visible: true } |
CTabFolder | setMaximized(Boolean) | maximized | CTabFolder { maximized: true } |
CTabFolder | setMinimized(Boolean) | minimized | CTabFolder { minimized: true } |
CTabFolder | setMaximizeVisible(Boolean) | maximize-visible | CTabFolder { maximize-visible: true } |
CTabFolder | setMinimizeVisible(Boolean) | minimize-visible | CTabFolder { minimize-visible: true } |
CTabFolder | setMRUVisible(Boolean) | mru-visible | CTabFolder { mru-visible: true } |
CTabFolder | setShowClose(Boolean) | show-close | CTabFolder { show-close: true } |
CTabFolder | setSimple(Boolean) | simple | CTabFolder { simple: true } |
CTabFolder | setSingle(Boolean) | single | CTabFolder { single: true } |
CTabFolder | setUnselectedCloseVisible(Boolean) | unselected-close-visible | CTabFolder { unselected-close-visible: true } |
CTabFolder | setUnselectedImageVisible(Boolean) | unselected-image-visible | CTabFolder { unselected-image-visible: true } |
Pseudo classes which can be used in CSS to style SWT widgets
SWT Widgets | CSS Pseudo Selector | CSS Example |
---|---|---|
CTabFolder | :selected | CTabFolder:selected { background-color: ##FF0000; } |
Shell | :active | Shell:active { background-color: ##FF0000; } |
Control | :focus | CTabFolder:focus { background-color: ##FF0000; } |