[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|          ACTIVATE POPUP         |
+---------------------------------+
ACTIVATE POPUP <popup name>
        [AT <row>, <column>]
        [BAR <expN>]
        [NOWAIT]
        [REST]

-----------------------------------
Displays and activates a popup.
-----------------------------------

The ACTIVATE POPUP command works in conjunction with the DEFINE POPUP
and DEFINE BAR commands.  Those two commands define and create a menu
popup that can be displayed anywhere on the screen.  The ACTIVATE POPUP
command causes the defined menu popup, labeled <popup name>, to be
displayed on the screen or in a window and activated for use.

<popup name>
        Name of popup to activate.

AT <row>, <column>
        Specifies where on screen or in window popup is activated.  The screen
or window position specified by this clause takes precedence over a
screen or window position specified by the FROM clause of DEFINE POPUP.

BAR <expN>
        Selects popup option number specified when popup is displayed.

NOWAIT
        Continues program execution after popup is displayed and activated.

REST
        Initially selects option in popup corresponding to current record
pointer position in database.

+---------------------------------+
|             Example             |
+---------------------------------+
In this example, menu bar named MAINMENU is defined.  Menu contains two
menu pads, INVOICES and CUSTOMERS.  When one of two pads is selected
popup is activated (INVPOP or CUSTPOP).  User then chooses menu option
and TMENU routine is executed.

*** Name the program ACTPOP.PRG ***
CLEAR
DEFINE MENU mainmenu BAR AT LINE 1
DEFINE PAD invoices  OF mainmenu PROMPT ' \<INVOICES '
DEFINE PAD customers OF mainmenu PROMPT ' \<CUSTOMERS '

ON SELECTION PAD invoices OF mainmenu ACTIVATE POPUP invpop
ON SELECTION PAD customers OF mainmenu ACTIVATE POPUP custpop

DEFINE POPUP invpop FROM 02,01
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 IN ACTPOP WITH POPUP(), PROMPT()

DEFINE POPUP custpop FROM 02,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 IN ACTPOP WITH POPUP(),PROMPT()

ACTIVATE MENU mainmenu

PROCEDURE tmenu
PARAMETER mpopup, mprompt
  DO CASE
    CASE mpopup = 'INVPOP'
    WAIT WINDOW 'Selected prompt of popup invpop is: ' + mprompt NOWAIT
    CASE mpopup = 'CUSTPOP'
    WAIT WINDOW 'Selected prompt of popup custpop is: ' + mprompt NOWAIT
  ENDCASE
RETURN

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

See Also:  DEFINE BAR, DEFINE POPUP, HIDE POPUP, SHOW POPUP

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

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