[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| @ ... GET - Check Boxes |
+---------------------------------+
@ <row, column> GET <var>
FUNCTION <expC1>
| PICTURE <expC2>
[DEFAULT <expr>]
[SIZE <expN1>, <expN2>]
[ENABLE | DISABLE]
[MESSAGE <expC3>]
[VALID <expL1>]
[WHEN <expL2>]
[COLOR SCHEME <expN3>
| COLOR <color pair list>]
-----------------------------------
Creates a check box.
-----------------------------------
A check box is used to toggle between two states - true (.T.) or false
(.F.), yes or no, and so forth. On the screen, a check box is a pair of
square brackets, with a string of text to the right. The string of
text, called a prompt, indicates what the check box controls. For
example:
[X] Tax Exempt
The text of the prompt is specified by the FUNCTION or PICTURE clause.
When the check box is checked (when the condition is true), an X is
shown between the brackets. Only one check box may be created in a
single @ ... GET. Issue READ to activate the boxes.
<row, column>
Numeric coordinates (zero or greater) that specify the location of
check box.
GET <var>
Memory variable, array element or database field where choice of check
box is stored. Must be numeric or logical type. If Escape pressed,
<var> remains unchanged.
When a check box is initially displayed on the screen or in a window,
the box is checked if <var> contains a non-zero numeric value or a
logical true (.T.) value. The box isn't checked if <var> is zero or
logically false (.F.).
FUNCTION <expC1> | PICTURE <expC2>
Permissible function codes are:
*C Mandatory, always first. If PICTURE used, precede codes with @.
N Check box doesn't terminate READ. This is the default.
T Check box terminates READ.
Hot Keys
To assign a hot key, place \< before desired character of prompt.
Disabled Check Boxes
To disable a check box, place \\ before box's prompt.
DEFAULT <expr>
Creates memory variable if one specified does not exist. Ignored if
<expr> is a variable that already exists. <expr> must be of numeric or
logical type.
SIZE <expN1>, <expN2>
<expN1> specifies height of check box; <expN2> specifies width (in
columns). By default, the width of a check box is determined by the
length of the prompt. If the width specified by <expN2> is less than
the width of the prompt, the prompt will not be truncated.
ENABLE | DISABLE
Allows or prevents activation of check box when READ is issued. SHOW
GETS ENABLED can be used to enable a disabled GET.
MESSAGE <expC3>
Displays <expC3> when a check box is selected. By default, message is
centered on last line of the desktop. Message location can be
controlled with SET MESSAGE.
VALID <expL1>
Evaluated when check box is chosen. Typically, <expL1> is a UDF.
User-defined functions let you do many things, including: selecting,
enabling or disabling other GET fields or objects; initiating a Browse
session; invoking another data entry screen; or positioning on a new
record. CLEAR READ can be included in the user-defined function to
terminate the READ.
WHEN <expL2>
Allows or prohibits selection of check box. Often, <expL1> is a UDF.
If <expL2> evaluates to a logical false (.F.), the check box cannot be
selected and is skipped over if placed between other GET fields or
objects.
COLOR SCHEME <expN4> |
COLOR <color pair list>
Overrides current color scheme by specifying a different pre-defined
color scheme, or by specifying a list of color pairs. By default, the
color of a check box is derived from the color scheme of the current
output window or screen.
Color Pair Controls
1 Not used by check boxes
2 Not used by check boxes
3 Not used by check boxes
4 Not used by check boxes
5 Message
6 Selected check box prompt
7 Hot keys
8 Not used by check boxes
9 Enabled check box prompt
10 Disabled check box prompt
+---------------------------------+
| Examples |
+---------------------------------+
***** FUNCTION clause only
STORE 1 TO choice
@ 2,2 GET choice FUNCTION '*C Tax Exempt'
READ
STORE 1 TO choice
STORE '*C Tax Exempt' TO mprompt
@ 2,2 GET choice FUNCTION mprompt
READ
***** PICTURE clause only
STORE 1 TO choice
@ 2,2 GET choice PICTURE '@*C Tax Exempt'
READ
STORE 1 TO choice
@ 2,2 GET choice PICTURE '@*C' + ' Tax Exempt'
READ
***** FUNCTION and PICTURE clause together
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*C' PICTURE ' Tax Exempt'
READ
***** Check box with hot key
STORE 1 TO choice
@ 2,2 GET choice FUNCTION '*C' PICTURE ' Tax \<Exempt'
READ
***** Disabled check box
STORE 1 TO choice
@ 2,2 GET choice FUNCTION '*C \\Tax Exempt'
READ
***** Valid DEFAULT clauses
@ 5,0 GET choice FUNCTION '*C Tax exempt' DEFAULT .T.
READ
STORE .T. TO button
@ 5,0 GET choice FUNCTION '*C Tax exempt' DEFAULT button
READ
***** Override color defaults
STORE 1 TO choice
@ 5,0 GET choice FUNCTION '*C Tax Exempt' COLOR SCHEME 4
READ
* Defines check boxes with hot buttons and color characteristics
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson