# ControlButton

Import: `import com.install4j.api.styles.ControlButton;`

```java
interface ControlButton
```

Implemented by form components that want to handle navigation functionality for a style.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`setControlButtonText(String)`](#setcontrolbuttontext-string) | `void` | Called when the control button text is changed. |
| [`getControlButtonType()`](#getcontrolbuttontype) | `ControlButtonType` | Called by the framework to check the type of the control button. |
| [`focusControlButton()`](#focuscontrolbutton) | `void` | Called when the control button is focused. |

### setControlButtonText(String)

```java
void setControlButtonText(String text)
```

Called when the control button text is changed. This is called each time when a screen is activated, but it
can also be triggered programatically by a call to [`WizardContext.setControlButtonText`](../context/WizardContext.md#setcontrolbuttontext-controlbuttontype-string).


**Parameters:**

- `text` — the text for the button

### getControlButtonType()

```java
ControlButtonType getControlButtonType()
```

Called by the framework to check the type of the control button.
If your form component can handle multiple [`ControlButtonType`](../context/ControlButtonType.md)s, implement
[`ControlButtonContainer`](ControlButtonContainer.md) instead.


**Returns:** the control button type

### focusControlButton()

```java
void focusControlButton()
```

Called when the control button is focused. This is triggered programatically by a call to
[`WizardContext.focusControlButton`](../context/WizardContext.md#focuscontrolbutton-controlbuttontype).

