[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| @ ... GET - Popups |
+---------------------------------+
@ <row, column> GET <var>
FUNCTION <expC1>
| PICTURE <expC2>
[DEFAULT <expr>]
[FROM <array>]
[RANGE <expN1> [, <expN2>]]
[SIZE <expN3>, <expN4>]
[ENABLE | DISABLE]
[MESSAGE <expC3>]
[VALID <expL1>]
[WHEN <expL2>]
[COLOR SCHEME <expN5>
| COLOR <color pair list>]
-----------------------------------
Creates a popup.
-----------------------------------
On the screen a popup is a rectangle with double right and bottom lines,
like this:
+--------+
| Choice |
+--------+
When selected it displays a list of options from which you can choose.
The list of options is specified in FUNCTION or PICTURE.
<row, column>
Numeric coordinates (zero or greater) that specify upper left corner of
popup.
GET <var>
Memory variable, array element or database field where value of popup
is stored. Must be numeric or character type. If <var> is character,
the prompt of the item you choose is stored to <var>. If <var> is
numeric, the number representing the position of the item in the popup
is stored to <var>. If Escape pressed, <var> remains unchanged.
Initial Option Selection
Value of <var> determines which popup option (if any) is initially
displayed on face of popup.
If <var> is of character type, a case sensitive comparison is made
between <var> and the popup options. When the comparison is made, all
special characters and any leading or trailing spaces are ignored. If a
successful match is made, the matching option is initially displayed on
the face of the popup. If a match can't be made, the character value of
<var> is initially displayed on the face of the popup and is added as a
temporary option at the end of the popup.
FUNCTION <expC1> | PICTURE <expC2>
Permissible function codes are:
Mandatory, always first. To create more than one popup option, add
semicolon between each option's name. If PICTURE used, precede codes
with @.
N List doesn't terminate READ. This is the default.
T List terminates READ.
Hot Keys
To assign a hot key, place \< before desired character of option. Only
works after popup has been expanded.
Disabled Options
To disable popup option, place \ before option.
DEFAULT <expr>
Creates memory variable if one specified does not exist. Must be
numeric or character type. Ignored if variable already exists.
FROM <array>
Creates popup options from an array. If FROM <array> is included, any
other options specified in PICTURE or FUNCTION are ignored, but the
must still appear in the PICTURE or FUNCTION clause. The array can be
one or two-dimensional. If the array is two-dimensional, only elements
in the first column of the array create the options in the popup. The
first element in the array creates the first option in the popup, the
second in the first array column creates the second option and so on.
RANGE <expN1> [, <expN2>]
<expN1> specifies starting element in array; <expN2> specifies number
of elements used to create options.
SIZE <expN3> [,<expN4>]
<expN3> specifies height of popup (expN3 always = 1); <expN4> specifies
width of popup. By default, the width of the popup is determined by the
length of the longest option.
ENABLE | DISABLE
Allows or prevents activation of popup when READ is issued. To disable
individual popup options rather than a whole popup, see Disabled
Options, discussed earlier in this section. SHOW GETS ENABLED can be
used to enable a disabled GET.
MESSAGE <expC3>
Displays <expC3> when popup is selected. By default, the message is
displayed centered on the last line of the desk top. The location of
the message can be controlled with SET MESSAGE TO.
VALID <expL1>
Evaluated when popup option 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 the READ.
WHEN <expL2>
Allows or prohibits selection of popup. Often, <expL2> is a UDF.
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. By default, the
colors of a popup and its options are derived from the color scheme of
the current output window or screen.
Color Pair Controls
1 Disabled option
2 Enabled option
3 Border
4 Not used by popups
5 Message
6 Selected option + control
7 Hot keys
8 Not used by popups
9 Enabled control
10 Disabled control
+---------------------------------+
| Examples |
+---------------------------------+
***** FUNCTION clause only
STORE 1 TO choice
@ 4,2 GET choice FUNCTION ' Cash;Charge;Net 30;Net 60'
READ
STORE 1 TO choice
STORE ' Cash;Charge;Net 30;Net 60' TO mfunc
@ 4,2 GET choice FUNCTION mfunc
READ
***** PICTURE clause only
STORE 1 TO choice
@ 4,2 GET choice PICTURE '@ Cash;Charge;Net 30;Net 60'
READ
STORE 1 TO choice
@ 4,2 GET choice PICTURE '@' + ' Cash;Charge;Net 30;Net 60'
READ
***** FUNCTION and PICTURE clauses together
STORE 1 TO choice
@ 4,2 GET choice FUNCTION '' ;
PICTURE ' Cash;Charge;Net 30;Net 60'
READ
STORE 1 TO choice
@ 4,2 GET choice FUNCTION ' Cash;Charge' ;
PICTURE ';Net 30;Net 60'
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson