@...GET - Push Buttons
Class
Screen Forms
Purpose
Create a group of FoxPro style push buttons
Syntax
@<expN1>,<expN2> GET <memvar> FUNCTION <expC1> | PICTURE <expC2>
[COLOR SCHEME <expN3> | COLOR <expC3>]
[DEFAULT <exp>]
[DISABLE | ENABLE]
[FONT <expC4>[, <expN4>]]
[MESSAGE <expC5>]
[PROPERTIES <expC6>]
[SIZE <expN5>,<expN6>[, <expN7>]]
[STYLE <expC7>]
[VALID <expL1> | <expN8>]
[WHEN <expL2>]
See Also
@...GET, @...SAY, READ, SET COMPATIBLE, SET FILETYPE
Description
The @...GET command can be used to create FoxPro style push buttons. One of the group of push buttons may be selected and the number of the selected push button is returned to the <memvar>, which must be of numeric data type.
Push buttons are displayed on the screen starting at the row <expN1>, column <expN2> coordinates as a pair of angled brackets containing a character string label. A push button can be selected using the [SPACEBAR] or the [RETURN] key. To move off a push button, use the cursor keys.
The FUNCTION or PICTURE clauses are used to define the GET as a group of push buttons. The definition must include the push button code, "*", followed by a space, followed by semi-colon separated text labels for the buttons. The push button code must be preceded with an "@" in the PICTURE clause. The following options may also be included, immediately after the "*":
Picture/Function Option | Description |
---|---|
N | READ is not terminated when a button is selected. |
T | READ is terminated when a button is selected. This is the default. |
H | The buttons are displayed in a horizontal row. |
V | The buttons are displayed in a vertical column. This is the default. |
Accelerator keys may be defined for each button by preceding the accelerator letter in the button label with the characters "<". For example, ...function "* <Save;Save <As", assigns the letter "S" as the accelerator key for "Save" and the letter "A" as the accelerator key for "Save As".
The following clauses can optionally be used:
Keyword | Description |
---|---|
COLOR <expC3> | 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 <expr> | 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 <expC4>[, <expN4>] | The name of the font is specified in <expC4> and, optionally, the font size in <expN4>. |
MESSAGE <expC5> | Defines a message to be displayed in the message line when the buttons are the active GET. |
PROPERTIES <expC6> | The PROPERTIES clause can be used to specify properties for the buttons. For information on the available properties, please see The Mirage Object Model in the Recital Mirage documentation. |
SIZE <expN5>,<expN6>[, <expN7>] | Defines the size of the buttons, <expN5> is the height and <expN6> is the width. The optional <expN7> defines the spaces between buttons. |
STYLE <expC7> | The STYLE clause can include the following in <expC7>:
B = Bold I = Italic U = Underline - = Strikeout |
<expN8> | When a button is selected, the validation is called. If the <expL1> evaluates to true (.T.), the selection is considered valid and the buttons are exited. If it evaluates to false (.F.), the selection is rejected. The VALID <expN7> 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 <expN7> is 0, the current GET remains in focus. When <expN7> is positive, the value is used to advance the GET focus the number of GETS specified. When <expN7> is negative, the value is used to move back the GET focus the number of GETS specified. |
WHEN <expL2> | The buttons can only be selected when <expL2> evaluates to true (.T.). |
Example
mButton = 2 @10,10 get mButton function "*TH OK;Cancel"; message "Select Button to continue" read if mButton = 1 // OK selected else // Cancel or no selection made endif
Products
Recital Mirage Server, Recital Terminal Developer