@...GET - Radio Buttons

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Create a group of FoxPro style radio 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>]

[STYLE <expC7>]

[VALID <expL1> | <expN7>]

[WHEN <expL2>]


See Also

@...GET, @...SAY, READ, SET COMPATIBLE, SET FILETYPE


Description

The @...GET command can be used to create FoxPro style radio buttons. One of the group of radio buttons may be selected and the number of the selected push button is returned to the <memvar>, which must be of numeric data type. Radio buttons are displayed on the screen starting at the row <expN1>, column <expN2> coordinates as a pair of brackets followed by a space then a character string label. If the radio button is selected, an asterisk is displayed inside the brackets. If the radio button is not selected, the brackets are empty. The radio buttons can be selected/deselected using the [SPACEBAR] or the [RETURN] key. To move off a radio button, use the cursor keys.

The FUNCTION or PICTURE clauses are used to define the GET as a group of radio buttons. The definition must include the radio button code, "*R", followed by a space, followed by semi-colon separated text labels for the buttons. The radio button code must be preceded with an "@" in the PICTURE clause. The following options may also be included, immediately after the "*R":


Picture/Function Option Description
N READ is not terminated when a button is selected. This is the default.
T READ is terminated when a button is selected.


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 any of the buttons is the active GET.
PROPERTIES <expC6> The PROPERTIES clause can be used to specify properties for the specified button. For information on the available properties, please see The Mirage Object Model in the Recital Mirage documentation.
SIZE <expN5>,<expN6> Defines the size of the control, <expN5> is the height and <expN6> is the width. Radio buttons always have a height of one, by default have the same width as their label, and are displayed on consecutive rows.
STYLE <expC7> The STYLE clause defines the font style. The following style qualifiers are supported in <expC7>:

B = Bold

I = Italic

U = Underline

- = Strikeout

<expN7> 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 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 the <expL2> condition evaluates to true (.T.).


NOTE: The @...GET...BUTTON syntax can also be used to create radio button controls.


Example

mDest = 2
@10,10 get mDest function "*R Screen;Printer;File"
read


Products

Recital