[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             PRMPAD              |
+---------------------------------+
PRMPAD(<expC1>, <expC2>)

-----------------------------------
Returns text from menu pad option.
Return value - Character
-----------------------------------

Menu pads are created with the DEFINE MENU and DEFINE PAD commands.  The
DEFINE MENU command creates the menu bar, while DEFINE PAD creates the
bars that appear in the menu.  PRMPAD() returns the text from the PROMPT
clause of a DEFINE PAD command.

<expC1>, <expC2>
        <expC1> is the menu name and <expC2> is the pad name in the menu bar.
Both the menu and the pad must be defined before using PRMPAD() or an
error message will be displayed.  A menu does not have to be active for
PRMPAD() to return the PROMPT text.

        If the PROMPT contains the hot key (\<) or disabled option (\)
designator, just the text of the PROMPT is returned - the designator is
removed.  PRMPAD() returns the null string ("") if the PROMPT was
created without any text.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In example below, menu bar named PRMEXAMPLE is created with three menu
pads.  Hot key and disabled option designators are not returned from pad
TWO and pad THREE. Menu is activated to show pads and is cleared from
screen and memory when pad is chosen.

CLEAR
SET TALK OFF
STORE 'prmexample' TO mpopname

DEFINE MENU prmexample BAR AT LINE 1
DEFINE PAD one OF prmexample PROMPT 'This will be returned'
DEFINE PAD two OF prmexample PROMPT '\<As will this'
DEFINE PAD three OF prmexample PROMPT '\And this too'

@  8,1 SAY PRMPAD('prmexample', 'one')
@  9,1 SAY PRMPAD('prmexample', 'two')
@ 10,1 SAY PRMPAD(mpopname, 'three')

ACTIVATE MENU prmexample
DEACTIVATE MENU prmexample
RELEASE MENU prmexample

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

See Also:  CNTBAR(), GETBAR(), DEFINE BAR, DEFINE POPUP, MRKPAD(),
PRMBAR()

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

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