RWT Theming Reference > Tree

## Tree

### Available CSS Properties

Properties that can be defined for this element:

- background-color

  Background color for trees.

- border

  The border around the tree including header.

- color

  Text color for trees.

### Applicable SWT Styles

SWT style flags that can be referred to in a selector for this element (as CSS attributes):

- [BORDER]

  Indicates that the tree should have a border.

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :disabled

  Applies to disabled trees.

- :linesvisible

  Applies to trees with gridlines.

## TreeItem

Item elements of tree controls

### Available CSS Properties

Properties that can be defined for this element:

- background-color

  Tree item background color

- background-image

  Tree item background image/gradient

- color

  Tree item text color

- text-decoration

  Decoration for item text.

- text-shadow

  Shadow for item text.

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :disabled

  Applies to the items of a disabled tree.

- :even

  Applies when the tree item has an even visible index

- :hover

  Mouse over state.

- :linesvisible

  Applies to items of a tree with gridlines.

- :selected

  When the tree item is selected

- :unfocused

  When the focus is not on the tree

## Tree-RowOverlay

Item overlay that can be used to overwrite the items own colors

### Available CSS Properties

Properties that can be defined for this element:

- background-color

  Tree item background color

- background-image

  Tree item background image/gradient

- color

  Tree item text color

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :disabled

  Applies to the items of a disabled tree.

- :even

  Applies when the tree item has an even index

- :hover

  Applies while the user hovers over the tree item.

- :linesvisible

  Applies to the items of a tree with gridlines.

- :selected

  Applies when tree item is selected.

- :unfocused

  Applies to items on unfocused tree.

## TreeColumn

Column header of Tree controls

### Available CSS Properties

Properties that can be defined for this element:

- background-color

  Background color for tree column headers

- background-image

  Background image or gradient for tree column headers.

- border-bottom

  Border for the bottom line of tree columns headers.

- color

  Text color for tree column headers

- font

  Font for tree column headers

- padding

  Padding for the content of tree columns headers.

- text-shadow

  Shadow for item text.

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :disabled

  Applies to column headers of a disabled tree.

- :hover

  Mouse over state

## TreeColumn-SortIndicator

Sort indicators in Tree column headers

### Available CSS Properties

Properties that can be defined for this element:

- background-image

  Indicator image for tree sorting (up/down)

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :disabled

  Applies when the tree is disabled.

- :down

  On sorting down

- :up

  On sorting up

## Tree-Cell

A single cell in a multi-column Tree

### Available CSS Properties

Properties that can be defined for this element:

- padding

  Defines the padding (i.e. the inner distance between border and content) for a tree cell.

- spacing

  Defines the spacing between image and text within a tree cell.

### Applicable SWT Styles

none

### Applicable States

none

## Tree-GridLine

Grid lines in Tree controls

### Available CSS Properties

Properties that can be defined for this element:

- color

  Grid line color when linesVisible is true

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :horizontal

  Applies for horizontal grid lines.

- :vertical

  Applies for vertical grid lines.

## Tree-Checkbox

Checkboxes in Tree controls

### Available CSS Properties

Properties that can be defined for this element:

- background-image

  Background image for the tree checkbox. The size of the image should be 13 x 13 pixels.

- margin

  Space around the check boxes

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :checked

  When tree checkbox is checked

- :grayed

  When tree checkbox is grayed

- :hover

  Applies while the user hovers over a tree check box.

## Tree-Indent

The area freed by indenting an item for one level.

### Available CSS Properties

Properties that can be defined for this element:

- background-image

  Background image for the indention. It is centered within the available area, defined by the "width"-property and the height of the item. The overflow is not visible.

- width

  The indention-width of one level. This property can not be influenced by the states of the element.

### Applicable SWT Styles

none

### Applicable States

Widget states that can be referred to in a selector for this element (as CSS pseudo-classes):

- :collapsed

  Used for the final level if the item has children.

- :expanded

  Used for the final level if the item is expanded

- :first

  Used for the final level if the item has no previous sibling.

- :hover

  Mouse over state. Can not be used together with line.

- :last

  Used for the final level if the item has no next sibling.

- :line

  Indicates that the level continues after this item. Never used for the final level and therefore never combined with the other states.