9. Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The spin_control Field Template : How a Spin Control Field Works
 
Share this page                  
How a Spin Control Field Works
When the frame containing the spin control is executed, the field appears, containing a specified initial (default) value. For example, the default values in the Spin Control Assistant dialog produces the following:
A user can type a new value into the entry field portion of the spin control, or use the increment or decrement buttons to change the value. If a valid value is typed, it is verified the next time the increment or decrement button is clicked, and “clipped” to the limits defined for the field if it is out of range. If the value entered is valid, the buttons increment or decrement it as usual.
Another example of a generated spin control field, using the Weekdays choice list (ChoiceList Spin Control Type option), follows:
The functionality of the spin control is based on the Spin_Object user class, which handles its processing. For more information about the Spin_Object user class, see the appendix "Generated User Classes" in the Language Reference Guide.