The spinner widget is an input widget used for numeric input. Users can change the value using the up/down arrows, or users can set the value by typing it.
If a spinner is bound with character data type, then the user could type non-numeric characters into the field. When it is bound with numeric type, then Profound UI validates the data; i.e. it prevents the user from typing non-numeric characters into the field.
For more information on field validation, please visit the Validation and Error Messages page.
Most of the widget properties can be bound to RPG program variables. Binding is available only for the Rich UI environment.
If you bind the value property to a program value, then the data should be integer type:
For more information about binding, please visit the Field Binding page. Binding is available for the Rich UI only.
You can set these properties in designer, or you can bind them and let a program set the values.
value - Sets the initial value of the spinner. By default, value is blank. (Found under Identification.)
default value - When the "value" property is bound, then this property sets the initial value of the spinner. This value overrides any initial value set in the RPG program.
min value - Sets the minimum value for the spinner widget. (Found under Field Settings.)
max value - Sets the maximum value for the spinner widget. (Found under Field Settings.)
increment value - Specifies how much the widget is increased or decreased when the up-arrow or down-arrow is clicked. By default, increment value is '1'. (Found under Field Settings.)
These specify handlers for user events on the widget and are found under the Events property section.
onspin - Specifies a client-side script to run when users click the up or down arrow on the spinner widget.
onchange - Specifies a client-side script to run when users type the value. The event fires once focus leaves the widget; i.e. after a user presses tab or clicks elsewhere on the page.