[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             GETBAR              |
+---------------------------------+
GETBAR(<expC>, <expN>)

-----------------------------------
Returns number of a bar in a specific popup position.
Return value - Numeric
-----------------------------------

GETBAR() lets you determine the position of an option in a popup.  This
function is useful when options in a popup are added, removed or
rearranged.  Use DEFINE BAR to add an option to a popup or RELEASE BAR
to remove an option.  Popup options may be rearranged interactively if
MOVER is included when the popup is created with DEFINE POPUP.

<expC>
        Name of the popup.

<expN>
        Position of bar in popup.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example, a popup named DEMOPOP is created.  The MOVER keyword is
included so the options in DEMOPOP may be rearranged.  The popup is then
activated and a series of GETBAR() functions return the prompts for each
option in each position.

After you have rearranged the options, you can press F5 to display the
new order of the options.

CLEAR
ON KEY LABEL F5 DO showorder

DEFINE POPUP demopop MOVER FROM 2,2
DEFINE BAR 1 OF demopop PROMPT 'One'
DEFINE BAR 2 OF demopop PROMPT 'Two'
DEFINE BAR 3 OF demopop PROMPT 'Three'
DEFINE BAR 4 OF demopop PROMPT 'Four'

DO showorder
ACTIVATE POPUP demopop

PROCEDURE showorder

CLEAR
@ 3,12 SAY  '1 ' + PRMBAR('demopop', GETBAR('demopop',1))
@ 4,12 SAY  '2 ' + PRMBAR('demopop', GETBAR('demopop',2))
@ 5,12 SAY  '3 ' + PRMBAR('demopop', GETBAR('demopop',3))
@ 6,12 SAY  '4 ' + PRMBAR('demopop', GETBAR('demopop',4))

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

See Also:  DEFINE BAR, DEFINE POPUP, PRMBAR(), RELEASE

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

See Also: DEFINE BAR DEFINE POPUP PRMBAR() RELEASE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson