[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| POPUP |
+---------------------------------+
POPUP()
-----------------------------------
Returns name of active popup.
Return value - Character
-----------------------------------
A menu popup must be defined and active for the POPUP() function to
return its name. Menu popups are defined and activated with the DEFINE
POPUP and ACTIVATE POPUP commands. If a menu popup is not active or the
POPUP() function is issued from the Command window, POPUP() returns the
null string.
+---------------------------------+
| Program Example |
+---------------------------------+
In this example menu bar with two menu pads is defined and popup is
assigned to each menu pad. When item is chosen from popup, two values
are passed to TMENU routine by POPUP() and PROMPT(). POPUP() passes
name of active popup, and PROMPT() passes prompt that was chosen. TMENU
routine displays names of popup and prompt that were chosen.
CLEAR
DEFINE MENU mainmenu
DEFINE PAD invoices OF mainmenu PROMPT ' \<INVOICES ' AT 1,0
DEFINE PAD customers OF mainmenu PROMPT ' \<CUSTOMERS ' AT 1,20
ON SELECTION PAD invoices OF mainmenu ACTIVATE POPUP invpop
ON SELECTION PAD customers OF mainmenu ACTIVATE POPUP custpop
DEFINE POPUP invpop FROM 2,1
DEFINE BAR 1 OF invpop PROMPT '\<The invoice stack'
DEFINE BAR 2 OF invpop PROMPT '\<Print one or more invoices'
DEFINE BAR 3 OF invpop PROMPT '\<Show me what my sales are'
ON SELECTION POPUP invpop DO tmenu WITH POPUP(), PROMPT()
DEFINE POPUP custpop FROM 2,14
DEFINE BAR 1 OF custpop PROMPT '\<Look at the Customer info'
DEFINE BAR 2 OF custpop PROMPT 'L\<ist my customers'
DEFINE BAR 3 OF custpop PROMPT '\<Make customer labels'
DEFINE BAR 4 OF custpop PROMPT '\<The Customer Ledger'
ON SELECTION POPUP custpop DO tmenu WITH POPUP(), PROMPT()
ACTIVATE MENU mainmenu
PROCEDURE tmenu
PARAMETER mpopup, mprompt
DO CASE
CASE mpopup = 'INVPOP'
WAIT WINDOW 'Selected prompt of invpop is: ' + mprompt NOWAIT
CASE mpopup = 'CUSTPOP'
WAIT WINDOW 'Selected prompt of custpop is: ' + mprompt NOWAIT
ENDCASE
DEACTIVATE POPUP
RETURN
-----------------------------------
See Also: ACTIVATE POPUP, BAR(), DEACTIVATE POPUP, DEFINE POPUP
-----------------------------------
See Also:
ACTIVATE POPUP
BAR()
DEACTIVATE POPUP
DEFINE POPUP
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson