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.
Validation (Rich UI Only)
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. Field Binding (Rich UI Only)
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. Spinner Properties
You can set these properties in designer, or you can bind them and let a program set the values.
- Sets the initial value of the spinner. By default, value is blank. (Found under value Identification.) - 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. default value - Sets the minimum value for the spinner widget. min value (Found under Field Settings.) - Sets the maximum value for the spinner widget. (Found under max value Field Settings.) - 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 increment value Field Settings.) Event Properties
These specify handlers for user events on the widget and are found under the
Events property section. - Specifies a client-side script to run when users click the up or down arrow on the spinner widget. onspin - 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. onchange