[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|        DEACTIVATE POPUP         |
+---------------------------------+
DEACTIVATE POPUP

-----------------------------------
Deactivates popup and removes it from screen.
-----------------------------------

The DEACTIVATE POPUP command removes an active menu popup from the
screen or a window but not from memory.  Only one menu popup may be
active at a time so it is not necessary to include the POPUP name.  The
popup may be reactivated using the ACTIVATE POPUP command and the menu
popup name.

To release a specific menu popup or a set of menu popups from memory use
the RELEASE POPUPS command and the menu popup name.  You may release all
menu popup from memory with the CLEAR POPUPS and CLEAR ALL commands.

DEACTIVATE POPUP will only execute from within program files.  Program
control is returned to the program line immediately following the line
that activated the menu popup.  DEACTIVATE POPUP has no effect when
issued from the Command window.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example, menu bar named MAINMENU is defined.  When one of popup
options is chosen, ON SELECTION POPUP is executed and TMENU routine
returns appropriate message.

*** This program must be named DEACPOP.PRG ***
CLEAR
DEFINE MENU mainmenu BAR AT LINE 1
DEFINE PAD invoices  OF mainmenu PROMPT ' \<Invoices '
DEFINE PAD customers OF mainmenu PROMPT ' \<Customers '
DEFINE PAD getout    OF mainmenu PROMPT ' \<Quit '
ON SELECTION PAD invoices  OF mainmenu ACTIVATE POPUP invpop
ON SELECTION PAD customers OF mainmenu ACTIVATE POPUP custpop
ON SELECTION PAD getout    OF mainmenu DO cleanup IN deacpop

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 IN deacpop ;
        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 IN deacpop ;
        WITH POPUP(), PROMPT()

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

PROCEDURE cleanup
DEACTIVATE MENU mainmenu
RELEASE MENU mainmenu
RELEASE POPUP custpop
RELEASE POPUP invpop
RETURN

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

See Also:  ACTIVATE POPUP, CLEAR, DEFINE POPUP, HIDE POPUP, RELEASE,
SHOW POPUP

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

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