Create a FoxPro style numeric spinner
@<expN1>,<expN2> GET <memvar> | <field> SPINNER <expN3> [, <expN4> [,<expN5>]]
[COLOR SCHEME <expN6> | COLOR <expC1>]
[DISABLE | ENABLE]
[FONT <expC2>[, <expN8>]]
[VALID <expL1> | <expN13> [ERROR <expC8>]]
The @...GET...SPINNER command can be used to create FoxPro style numeric spinners. Spinners allow you to 'spin' through a series of numeric values. The top left hand corner of the spinner is positioned at row <expN1>, column <expN2>.
Spinners are only available in Recital Mirage. In Recital Terminal Developer the @...GET...SPINNER command is treated as a standard numeric @...GET. In Recital Mirage, the mouse is used to click on the up or down arrows to change the spinner value.
The numeric expression, <expN3>, defines the increment/decrement value to be used when the up/down arrow is clicked. The range of allowed values can be specified in the optional <expN4>, used to specify the minimum value, and <expN5>, used to specify the maximum value.
The following clauses can optionally be used:
|COLOR <expC1>||COLOR SCHEME clause then the @...GET is displayed in the default Color of Fields. The color that is specified overrides the SET COLOR command, but only for the output of the current @…GET command.|
|DEFAULT <expN7>||The DEFAULT clause specifies a default value for <memvar>.|
|ENABLE||If the DISABLE clause is included, the GET is not active and cannot be selected or modified. GETs are enabled by default. READ will exit immediately if all GETs are marked DISABLE.|
|FONT <expC2>[, <expN8>]||The name of the font is specified in <expC2> and, optionally, the font size in <expN8>.|
|FUNCTION <expC3>||The FUNCTION clause can include the following in <expC3>:
B = The value is left justified.
I = The value is centered.
J = The value is right justified.
K = The entire value is selected when the spinner is selected.
L = The value is displayed with leading zeroes.
Z = The value is displayed as blank if zero.
^ = The value is displayed using scientific notation.
$ = The value is displayed in currency format.
|MESSAGE <expC4>||Defines a message to be displayed in the message line when the spinner is the active GET.|
|PICTURE <expC5>||The PICTURE clause can include the following in <expC5>:
9 = Allows digits and signs (+ -) to be entered.
# = Allows digits, blanks and signs (+ -) to be entered.
$ = Displays the currency symbol.
* = Displays asterisks to the left of the value.
. = Specifies the position of the decimal point.
, = Specifies the position of 'thousand' separators.
|PROPERTIES <expC6>||The PROPERTIES clause can be used to specify properties for the spinner. For information on the available properties, please see The Mirage Object Model in the Recital Mirage documentation.|
|RANGE [<expN9][,expN10>]||The RANGE clause can be used to check whether the spinner value falls between acceptable minimum, <expN9> and maximum, <expN10> limits. Either limit can be omitted.|
|SIZE <expN11>,<expN12>||Defines the size of the control, <expN11> is the height and <expN11> is the width.|
|STYLE <expC7>||The STYLE clause can include the following in <expC7>:
B = Bold
I = Italic
U = Underline
- = Strikeout
|<expN13> [ERROR <expC8>]||The VALID clause is used to validate data entry. When the selected button is changed, the validation is called If the <expL1> evaluates to true (.T.), the input is considered correct and the button group is exited. If it evaluates to false (.F.), the data change is rejected. The optional ERROR clause causes the character expression <expC6> to be displayed when <expL1> evaluates to .F. (false). The VALID <expN13> option may be used with a function that returns a numeric value to select a GET for input. GET numbers are assigned in the order that they appear on the screen. The GETNO() function returns the number of the currently active get. The numeric value returned can have three different effects. When <expN13> is 0, the current GET remains in focus. When <expN13> is positive, the value is used to advance the GET focus the number of GETS specified. When <expN13> is negative, the value is used to move back the GET focus the number of GETS specified.|
|WHEN <expL2>||The spinner can only be used when the <expL2> condition evaluates to true (.T.).|
store 1 to mspinner @20,0 say "Spinner: " get mspinner spinner 1, -5 , 20