[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| @ ... GET - Invisible Buttons |
+---------------------------------+
@ <row, column> GET <var>
FUNCTION <expC1>
| PICTURE <expC2>
[DEFAULT <expN1>]
[SIZE <expN2>, <expN3>
[, <expN4>]]
[ENABLE | DISABLE]
[MESSAGE <expC3>]
[VALID <expL1>]
[WHEN <expL2>]
[COLOR SCHEME <expN5>
| COLOR <color pair list>]
-----------------------------------
Creates invisible buttons.
-----------------------------------
Invisible buttons are rectangular regions of the screen or a window that
you can select. You can use @...SAY to place characters over the
rectangular button regions. When you select an invisible button, the
characters in the button are highlighted. Issue READ to activate the
buttons.
<row, column>
Numeric coordinates (zero or greater) that specify upper left corner of
first button.
GET <var>
Memory variable, array element or database field where a number
corresponding to your choice is stored. If Escape pressed, <var>
remains unchanged.
FUNCTION <expC1> | PICTURE <expC2>
Permissible function codes are:
*I Mandatory, always first. To create more than one button, add
semicolon for each additional button. If PICTURE used, precede codes
with @. For example, this clause creates three invisible buttons. Note
that the clause contains only two semicolons:
... FUNCTION '*I ;;' ...
N Buttons don't terminate READ. This is the default.
T Buttons terminate READ.
H Horizontal buttons.
V (default) Vertical buttons.
H and V can be combined with T and N options as NH, NV, TH, or TV.
Disabled Invisible Buttons
To disable an invisible button, place \\ before semicolon corresponding
to button.
DEFAULT <expN1>
Creates memory variable if one specified does not exist. Will not
create fields or array elements. Ignored if variable already exists.
SIZE <expN2>, <expN3> [, <expN4>]
<expN2> controls height of each button; <expN3> controls width of each
button; <expN4> controls spacing between buttons. Default for height
and width is 0.
ENABLE | DISABLE
Allows or prevents activation of buttons when READ is issued. To
disable individual invisible buttons, see "Disabled Invisible Buttons"
earlier in this section.
MESSAGE <expC3>
Displays <expC3> when invisible button is selected. The message is
displayed centered on the last line of the desk top.
VALID <expL1>
Evaluated when an invisible button 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 may be included in the user-defined function
to terminate READ.
WHEN <expL2>
Allows or prohibits selection of invisible buttons. Often, <expL2> is
a UDF. <expL2> must evaluate to a logical true (.T.) before any of the
invisible buttons can be selected.
COLOR SCHEME <expN5> |
COLOR <color pair list>
Overrides current color scheme by specifying a different pre-defined
color scheme, or by specifying a list of color pairs.
+---------------------------------+
| Examples |
+---------------------------------+
***** FUNCTION clause only
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*I ;;;;' SIZE 2,4,1
READ
STORE 1 TO choice
STORE '*I ;;;;' TO mfunc
@ 4,2 GET choice FUNCTION mfunc SIZE 2,4,1
READ
***** PICTURE clause only
STORE 1 TO choice
@ 4,2 GET choice PICTURE '@*I ;;;;' SIZE 2,4,1
READ
STORE 1 TO choice
@ 4,2 GET choice PICTURE '@*I' + ' ;;;;' SIZE 2,4,1
READ
***** FUNCTION and PICTURE clauses together
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*I' PICTURE ' ;;;;' SIZE 2,4,1
READ
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*I ;;' PICTURE ';;' SIZE 2,4,1
READ
***** Disabled invisible buttons
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '*I' ;
PICTURE ' ;\\;;\\;' SIZE 2,4,1
READ
***** Valid DEFAULT clauses
@ 5,0 GET choice FUNCTION '*I ;;;;' DEFAULT 1
READ
STORE 3 TO button
@ 5,0 GET choice FUNCTION '*I ;;;;' DEFAULT button
READ
+---------------------------------+
| Program Example |
+---------------------------------+
The following program example demonstrates the use of invisible buttons.
@...SAY places four sets of characters (hearts, diamonds, clubs and
spades) on the screen. Four invisible buttons are created that coincide
with the characters displayed by the @...SAYs. When an invisible button
is chosen, a VALID routine (SHOWCARD) is executed that displays which
button was chosen:
STORE 0 TO choice
CLEAR
@ 2,2 SAY REPLICATE(CHR(3),2) && Hearts
@ 3,2 SAY REPLICATE(CHR(3),2)
@ 2,10 SAY REPLICATE(CHR(4),2) && Diamonds
@ 3,10 SAY REPLICATE(CHR(4),2)
@ 2,18 SAY REPLICATE(CHR(5),2) && Clubs
@ 3,18 SAY REPLICATE(CHR(5),2)
@ 2,26 SAY REPLICATE(CHR(6),2) && Spades
@ 3,26 SAY REPLICATE(CHR(6),2)
@ 1,1,4,4 BOX
@ 1,9,4,12 BOX
@ 1,17,4,20 BOX
@ 1,25,4,28 BOX
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson