RWT Theming Reference > Button

## Button

RWT Buttons, including push-buttons, toggle-buttons, radio-buttons and check-boxes.

### Available CSS Properties

Properties that can be defined for this element:

- animation

  Supports animations-types "hoverIn" and "hoverOut". Others are ignored.

- background-color

  Background color for buttons.

- background-image

  Background image for buttons.

- border

  Border for buttons.

- border-radius

  Border radius. The border radius has no effect if an enhanced border, like "inset" or "outset" is used.

- color

  Text color for buttons.

- cursor

  Control's cursor.

- font

  Font for button text.

- opacity

  The opacity of the button. A value between 0 and 1.

- padding

  Padding (inner distance) for buttons.

- spacing

  Space between text and image.

### Applicable SWT Styles

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

- [BORDER]

  Indicates that the button should have a border.

- [CHECK]

  Indicates that the button is a check box.

- [FLAT]

  Indicates that the button should have a flat appearance.

- [PUSH]

  Indicates that the button is a push button.

- [RADIO]

  Indicates that the button is a radio button.

- [TOGGLE]

  Indicates that the button is a toggle button.

### Applicable States

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

- :disabled

  Applies for disabled buttons.

- :hover

  Applies while the user hovers over a button.

- :pressed

  Applies while a button is pressed.

- :selected

  Applies for selected TOGGLE, CHECK and RADIO buttons.

## Button-CheckIcon

The icon to indicate the check and/or grayed state of a Button with style CHECK

### Available CSS Properties

Properties that can be defined for this element:

- background-image

  Icon image of the check box.

### 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 button is disabled.

- :grayed

  Applies when the check box is grayed.

- :hover

  Applies while the user hovers over the check box.

- :selected

  Applies for checked check boxes.

## Button-RadioIcon

The icon to indicate the selected state of a Button with style RADIO

### Available CSS Properties

Properties that can be defined for this element:

- background-image

  Icon image of the radio button.

### 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 button is disabled.

- :hover

  Applies while the user hovers over the radio button.

- :selected

  Applies for selected radio buttons.

## Button-FocusIndicator

The frame that is drawn when the button is focused.

### Available CSS Properties

Properties that can be defined for this element:

- background-color

  The fill-color of the frame.

- border

  The border of the frame. 3D-styles inset, outset, etc are not supported.

- margin

  The margin between the buttons border and the frame. Only used if padding is set to "0px".

- opacity

  The opacity of the indicator. A value between 0 and 1.

- padding

  The padding between the frame and the buttons text. If this is set to "0px", margin will be used to layout the FocusIndicator.

### Applicable SWT Styles

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

- [BORDER]

  Indicates that the button should have a border.

- [CHECK]

  Indicates that the button is a check box.

- [FLAT]

  Indicates that the button should have a flat appearance.

- [PUSH]

  Indicates that the button is a push button.

- [RADIO]

  Indicates that the button is a radio button.

- [TOGGLE]

  Indicates that the button is a toggle button.

### Applicable States

none