[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|            SHOW GET             |
+---------------------------------+
SHOW GET <var>
        [, <expN1> [PROMPT <expC>]]
        [ENABLE | DISABLE]
        [LEVEL <expN2>]
        [COLOR <color pair list>
        | COLOR SCHEME <expN3>]

-----------------------------------
Redisplays single GET object.
-----------------------------------

When value of GET field changes, SHOW GET updates value of GET field.
When the GET object is redisplayed, it can optionally be enabled or
disabled.

SHOW GET can also be used to redisplay an individual button within a set
of invisible, radio or push buttons.  You can also change prompts of
check boxes and buttons with SHOW GET.

A routine containing SHOW GET can be used to redisplay a GET object.   A
GET level VALID or WHEN, or a READ level ACTIVATE or DEACTIVATE routine
could contain a SHOW GET.

SHOW GET vs. SHOW GETS and SHOW OBJECT
        All GETS are redisplayed with SHOW GETS.  Individual objects can be
redisplayed with SHOW GET or SHOW OBJECT.  SHOW GETS will execute the
READ LEVEL SHOW routine.  SHOW GET and SHOW OBJECT will not.

Clauses
-------

<var>
        Memory variable, array element or database field that you specified
with @ ... GET <var>.

<expN1>
        Redisplay single push, radio or invisible button within a set of
buttons by including number of button <expN1> with <var>.  A button's
number is determined by the order in which button prompts are created.

PROMPT <expC>
        Prompt for an individual push button, radio button or check box may be
replaced with another by including PROMPT <expC>.  <expC> replaces
original button or check box prompt.  Button or check box attributes
(enabled, disabled, hot keys, default choice or escape choice) can also
be changed by including appropriate special characters in <expC>.

ENABLE | DISABLE
        ENABLE allows the specified object to be selected or chosen.  DISABLE
prevents an object from being selected or chosen.  The object is
redisplayed in the disabled colors.

LEVEL <expN2>
        Nested READs can be created by issuing GETs and a READ in a routine
called while in READ.  READs can be nested to five levels.

        If LEVEL isn't included, SHOW GET defaults to the current READ level.
Including LEVEL lets you redisplay an object on a READ level other than
the current level.  The numeric expression <expN2> can assume the value
1, 2, 3, 4 or 5 corresponding to the READ level of the object you want
to redisplay.  RDLEVEL() returns the current READ level.

COLOR <color pair list>
COLOR SCHEME <expN3>
        An objects can be redisplayed in colors you specify.  You can specify a
color pair list or a color scheme.

+---------------------------------+
|        Program Examples         |
+---------------------------------+
In following example, three radio buttons with prompts Apples, Oranges
and Lemons are created.  Here <var> is a memory variable named fruit.
<var> initializes radio buttons (since fruit equals 2, second button is
initially selected), and button number is stored to <var> when a button
is chosen.

CLEAR
STORE 2 TO fruit
@4,2 GET fruit PICTURE '@*R Apples;Oranges;Lemons'
READ CYCLE

The following program creates the same buttons as above.  However, when
one of the radio buttons is chosen, the NOORANGE VALID routine is
executed.  The NOORANGE routine disables the Oranges button with SHOW
GET and the DISABLE keyword.

CLEAR
STORE 2 TO fruit
@4,2 GET fruit PICTURE '@*R Apples;Oranges;Lemons' VALID noorange()
READ CYCLE

FUNCTION noorange
SHOW GET fruit,2 DISABLE  && Disable second button
_CUROBJ = 1
RETURN .T.

In the following example, a check box is created.  When the check box is
chosen, VALID clause routine NEWPROMPT is executed.  The NEWPROMPT
routine changes the check box prompt and the hot key.

CLEAR
STORE 1 TO check
@4,2 GET check FUNCTION '*C \<Checked' SIZE 1,13 VALID NEWPROMPT()
READ CYCLE

FUNCTION newprompt
IF check = 0
        SHOW GET check,1 PROMPT '\<Unchecked'
ELSE
        SHOW GET check,1 PROMPT '\<Checked'
ENDIF
RETURN .T.

-----------------------------------

See Also:  @ ... SAY/GET, CLEAR, _CUROBJ, OBJNUM(), RDLEVEL(), READ,
SHOW GETS, SHOW OBJECT

-----------------------------------

See Also: @ ... SAY/GET CLEAR OBJNUM() RDLEVEL() READ
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson