# Form components: Sliders and spinners

install4j BeanInfo catalog. Each entry below documents a bean class that can appear inside a `<serializedBean>` element in an install4j project file.

## Contents

- [Slider](#slider) — `com.install4j.runtime.beans.formcomponents.SliderComponent`
- [Spinner of dates](#spinner-of-dates) — `com.install4j.runtime.beans.formcomponents.DateSpinnerComponent`
- [Spinner of enumerated values](#spinner-of-enumerated-values) — `com.install4j.runtime.beans.formcomponents.ListSpinnerComponent`
- [Spinner of integer values](#spinner-of-integer-values) — `com.install4j.runtime.beans.formcomponents.NumberSpinnerComponent`

---

### Slider
- **Class:** `com.install4j.runtime.beans.formcomponents.SliderComponent`
- **Category:** Sliders and spinners
- **Multiple instances:** yes

A slider with an optional leading label. The user input (a java.lang.Integer) is saved to a variable.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. To configure a keyboard shortcut, prefix the mnemonic character in the label text with &, e.g."&User". The prefixed character will be underlined and the platform-specific keyboard shortcut (e.g. ALT+[character] on Windows) will allow the user to quickly navigate to this form component with the keyboard. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |
| `requestFocus` — Request focus | boolean | User input | — | If selected, the form component will request the focus after the form is activated. If you have multiple form components in a single form that have this property selected, the result is undefined. |
| `variableName` — Variable name | String [context=variableName] (variable→ Integer) | User input | — | The name of the variable to which the user input is assigned. The type of the variable value is java.lang.Integer |
| `minValue` — Minimum value | int | Slider | — | The minimum value on the left side of the slider. |
| `maxValue` — Maximum value | int | Slider | — | The maximum value on the right side of the slider. |
| `initialValue` — Initial value | int | Slider | — | The initial value of the slider. |
| `majorTickSpacing` — Major tick spacing | int | Slider | — | The spacing between major ticks expressed as a value. |
| `minorTickSpacing` — Minor tick spacing | int | Slider | — | The spacing between minor ticks expressed as a value. |
| `snapToTicks` — Snap to ticks | boolean | Slider | — | If set, the user selection is snapped to the closest tick value. |
| `widgetStyleId` — Slider widget style | String [context=widgetStyleIdOrCustom] | Slider | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `widgetStyle` — widgetStyle | SliderWidgetStyle | Slider | `widgetStyleId` (custom condition) | widgetStyle |

### Spinner of dates
- **Class:** `com.install4j.runtime.beans.formcomponents.DateSpinnerComponent`
- **Category:** Sliders and spinners
- **Multiple instances:** yes

A spinner with date and time values with an optional leading label. The user input is saved to a variable.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. To configure a keyboard shortcut, prefix the mnemonic character in the label text with &, e.g."&User". The prefixed character will be underlined and the platform-specific keyboard shortcut (e.g. ALT+[character] on Windows) will allow the user to quickly navigate to this form component with the keyboard. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |
| `requestFocus` — Request focus | boolean | User input | — | If selected, the form component will request the focus after the form is activated. If you have multiple form components in a single form that have this property selected, the result is undefined. |
| `valueChangedScript` — Value change script | ScriptProperty → void | User input | — | A script that is executed when the value is changed by the user. This script is only required for advanced customizations of the form screen. The return type is void. |
| `variableName` — Variable name | String [context=variableName] (variable→ Date) | User input | — | The name of the variable to which the user input is assigned. The type of the variable value is java.util.Date |
| `widgetStyleId` — Text component style | String [context=widgetStyleIdOrCustom] | Spinner | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `widgetStyle` — widgetStyle | TextComponentWidgetStyle | Spinner | `widgetStyleId` (custom condition) | widgetStyle |
| `dateFormatPattern` — Date format pattern | String [context=dateTime] | Spinner | — | A pattern to format dates for display and input as described in the javadoc of java.text.SimpleDateFormat. An example is yyyy.MM.dd 'at' HH:mm:ss z. If empty, a locale-dependent default pattern with date and time components will be used. |
| `initialValue` — Initial value | Date [context=dateTime] | Spinner | — | The initial value of the spinner. |

### Spinner of enumerated values
- **Class:** `com.install4j.runtime.beans.formcomponents.ListSpinnerComponent`
- **Category:** Sliders and spinners
- **Multiple instances:** yes

A spinner with enumerated values with an optional leading label. The user input is saved to a variable.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. To configure a keyboard shortcut, prefix the mnemonic character in the label text with &, e.g."&User". The prefixed character will be underlined and the platform-specific keyboard shortcut (e.g. ALT+[character] on Windows) will allow the user to quickly navigate to this form component with the keyboard. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |
| `requestFocus` — Request focus | boolean | User input | — | If selected, the form component will request the focus after the form is activated. If you have multiple form components in a single form that have this property selected, the result is undefined. |
| `valueChangedScript` — Value change script | ScriptProperty → void | User input | — | A script that is executed when the value is changed by the user. This script is only required for advanced customizations of the form screen. The return type is void. |
| `variableName` — Variable name | String [context=variableName] (variable→ String) | User input | — | The name of the variable to which the user input is assigned. The type of the variable value is java.lang.String |
| `widgetStyleId` — Text component style | String [context=widgetStyleIdOrCustom] | Spinner | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `widgetStyle` — widgetStyle | TextComponentWidgetStyle | Spinner | `widgetStyleId` (custom condition) | widgetStyle |
| `listEntries` — List entries | String[] [context=item] | Spinner | — | The items in the spinner. In the edit dialog, you have to enter one item per line. List items that are installer variables with array or collection values (e.g. String[], Object[] or List<File>) are expanded as separate list items, this allows you to build a variable length list of list items at runtime. |
| `initiallySelectedIndex` — Initially selected index | int | Spinner | — | The zero-based index of the initially selected item in the spinner. |

### Spinner of integer values
- **Class:** `com.install4j.runtime.beans.formcomponents.NumberSpinnerComponent`
- **Category:** Sliders and spinners
- **Multiple instances:** yes

A spinner with integer values with an optional leading label. The user input is saved to a variable.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. To configure a keyboard shortcut, prefix the mnemonic character in the label text with &, e.g."&User". The prefixed character will be underlined and the platform-specific keyboard shortcut (e.g. ALT+[character] on Windows) will allow the user to quickly navigate to this form component with the keyboard. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |
| `requestFocus` — Request focus | boolean | User input | — | If selected, the form component will request the focus after the form is activated. If you have multiple form components in a single form that have this property selected, the result is undefined. |
| `valueChangedScript` — Value change script | ScriptProperty → void | User input | — | A script that is executed when the value is changed by the user. This script is only required for advanced customizations of the form screen. The return type is void. |
| `variableName` — Variable name | String [context=variableName] (variable→ Integer) | User input | — | The name of the variable to which the user input is assigned. The type of the variable value is java.lang.Integer |
| `widgetStyleId` — Text component style | String [context=widgetStyleIdOrCustom] | Spinner | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `widgetStyle` — widgetStyle | TextComponentWidgetStyle | Spinner | `widgetStyleId` (custom condition) | widgetStyle |
| `minValue` — Minimum value | int | Spinner | — | The minimum value on the left side of the spinner. |
| `maxValue` — Maximum value | int | Spinner | — | The maximum value on the right side of the spinner. |
| `initialValue` — Initial value | int | Spinner | — | The initial value of the spinner. |
| `stepSize` — Step size | int | Spinner | — | The step size for the spinner. |

