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.
Nebula CSS Grid
Revision as of 11:55, 26 March 2020 by Unnamed Poltroon (Talk) (Created page with "< Back to Nebula Main Page ==Introduction== This page explains how to use the CSS theming for the '''Grid''' widget. __TOC__ ==Installation== In you e4 applica...")
Introduction
This page explains how to use the CSS theming for the Grid widget.
Contents
Installation
In you e4 application you can install :
- The plugin org.eclipse.nebula.widgets.grid.css OR
- The feature org.eclipse.nebula.widgets.grid.css.feature
Properties
General Properties
These properties allow the developer to customize the grid displayed in the background.
SWT Method | Impact | CSS Property Name | CSS Example |
---|---|---|---|
setGridSquareSize(int size) | Set the size of the square (in pixels) | grid-square-size | Oscilloscope { grid-square-size: 30px; } |
setGridLineWidth(int gridLineWidth) | Set the line width of the square (in pixels) | grid-line-width | Oscilloscope { grid-line-width: 5px; } |
setGridBackground(Color gridBackground) | Set color of the background | grid-background-color | Oscilloscope { grid-background-color: #808080; } |
setGridForeground(Color gridBackground) | Set color of the grid | grid-color | Oscilloscope { grid-color: darkred; } |
Columns properties
SWT Method | Impact | CSS Property Name | CSS Example |
---|---|---|---|
setForeground(int channel, Color color) | Set color of the graph | channel-color-n | Oscilloscope { channel-color-0: #FF6A00; } |
setActiveForegoundColor(Color color) | Set color of the graph when active | channel-active-color-n | Oscilloscope { channel-active-color-0: blue; } |
setInactiveForegoundColor(Color color) | Set color of the graph when not active | channel-inactive-color-n | Oscilloscope { channel-inactive-color-0: darkred; } |
Examples
An e4 example application called org.eclipse.nebula.widgets.grid.example.e4 shows how to customize the Grid widget.
This example is also available here : org.eclipse.nebula.widgets.grid.example.e4