[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|    @ ... GET - Push Buttons     |
+---------------------------------+
@ <row, column> GET <var>
        FUNCTION <expC1>
        | PICTURE <expC2>
        [DEFAULT <expr>]
        [SIZE <expN1>, <expN2>
                [, <expN3>]]
        [ENABLE | DISABLE]
        [MESSAGE <expC3>]
        [VALID <expL1>]
        [WHEN <expL2>]
        [COLOR SCHEME <expN4>
        | COLOR <color pair list>]

-----------------------------------
Creates push buttons.
-----------------------------------

On the screen, a push button is shown as a string of text between right
and left angle brackets.  For example:

        <   OK   >
        < Cancel >

The string of text, often called a prompt, is specified in the FUNCTION
or the PICTURE clause.  Typically, a push button is used to trigger an
action.  The triggered action is specified by VALID.  A push button is
activated by issuing READ.

Clauses
-------

<row, column>
        Numeric expressions that specify where the first push button of a set
of push buttons is placed.

GET <var>
        Memory variable, array element or database field where choice of push
button is stored.  Must be numeric or character type.  If <var> is of
numeric type, a number corresponding to your push button choice is
stored to <var>.  For example, if you create four push buttons and
choose the third button, 3 is stored to <var>.  If <var> is of character
type, the prompt of the push button you choose is stored to <var>. If
Escape pressed, <var> remains unchanged.

FUNCTION <expC1> | PICTURE <expC2>
        Permissible function codes are:

        *       Mandatory, always first.  To create more than one push button, add
semicolon between each button name.  If PICTURE used, precede codes with
@.

        N       Buttons don't terminate READ.

        T       Buttons terminate READ.  This is the default.

        H       Horizontal buttons.

        V       (default) Vertical buttons.  This is the default.

H and V can be combined with T and N options as NH, NV, TH, or TV.

Hot Keys
        To assign a hot key, place \< before desired character of push button
prompt.

Disabled Buttons
        To disable individual push button, place \\ before button's prompt.  To
disable an entire set of push buttons, see DISABLE, which is discussed
later in this section.

Default Buttons
        Automatically chosen when Ctrl+Enter pressed.  Displayed with double
angle brackets.   To create default push button, place \! before
button's prompt.  Only one default push button per READ permitted.

Escape Buttons
        Automatically chosen when Escape pressed.  To create an escape push
button, place \? before button's prompt.  Only one escape push button
per READ permitted.

DEFAULT <expr>
        Creates memory variable if one specified does not exist.  Ignored if
variable exists.  Must be of numeric or character type.

SIZE <expN1>, <expN2> [,<expN3>]
        <expN1> specifies height of object (expN1 always = 1); <expN2>
specifies width (in columns) of push button; <expN3> specifies number of
rows between buttons.  By default, the width of each individual button
is determined by the length of the push button prompt.

ENABLE | DISABLE
        Prevents or allows activation of push buttons when READ is issued.
SHOW GETS ENABLED can be used to enable a disabled GET.

MESSAGE <expC3>
        Displays <expC3> when a push button has been selected. By default, the
message is displayed centered on the last line of the screen.  The
location of the message can be controlled with SET MESSAGE TO.

VALID <expL1>
        Evaluated when a push 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 the READ.

WHEN <expL2>
        Allows or prohibits selection of push button.  Often, <expL2> is a UDF.

COLOR SCHEME <expN4>
| COLOR <color pair list>
        Overrides current color scheme by specifying a different pre-defined
color scheme, or by specifying a list color pair.  By default, the
colors of push buttons are derived from the color scheme of the current
output window or screen.

        Color Pair Controls
        1       Not used by push buttons
        2       Not used by push buttons
        3       Not used by push buttons
        4       Not used by push buttons
        5       Message
        6       Selected button prompt
        7       Hot keys
        8       Not used by push buttons
        9       Enabled button prompt
        10      Disabled button prompt

+---------------------------------+
|             Examples            |
+---------------------------------+
***** FUNCTION clause only
STORE 1 TO choice
@ 2,2 GET choice FUNCTION '* OK;Cancel' SIZE 1, 8
READ

STORE 1 TO choice
STORE '* OK;Cancel' TO mprompts
@ 2,2 GET choice FUNCTION mprompts SIZE 1, 8
READ

***** PICTURE clause only
STORE 1 TO choice
@ 2,2 GET choice PICTURE '@* OK;Cancel' SIZE 1, 8
READ

STORE 1 TO choice
@ 2,2 GET choice PICTURE '@*' + ' OK;Cancel' SIZE 1, 8
READ

***** FUNCTION clause only
STORE 1 TO choice
@ 2,2 GET choice FUNCTION '* OK;Cancel' SIZE 1, 8
READ

STORE 1 TO choice
STORE '* OK;Cancel' TO mprompts
@ 2,2 GET choice FUNCTION mprompts SIZE 1, 8
READ

***** PICTURE clause only

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson