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

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

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

To release a specific menu from memory use the RELEASE MENUS command and
the menu name.  You may release all menus from memory with the CLEAR ALL
and CLEAR MENUS commands.

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

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example named DEACMENU, a menu bar named MAINMENU is defined,
including actions that should take place when one of four pads on popup
is chosen.  Menu is then activated with  ACTIVATE MENU.  When one of
menu pads is chosen, appropriate ON SELECTION is executed, passing two
values to TMENU routine.

If Quit is chosen, menu is deactivated and released from memory.

*** This program must be named DEACMENU.PRG ***
CLEAR
DEFINE MENU mainmenu BAR AT LINE 1 KEY ALT+U
DEFINE PAD invoices  OF mainmenu PROMPT '\<Invoices'
DEFINE PAD customers OF mainmenu PROMPT '\<Customers'
DEFINE PAD inventory OF mainmenu PROMPT 'I\<nventory'
DEFINE PAD quit      OF mainmenu PROMPT '\<Quit'

ON SELECTION MENU mainmenu DO tmenu IN deacmenu WITH MENU(), PAD()

ACTIVATE MENU mainmenu NOWAIT

PROCEDURE tmenu
PARAMETER mmenu, mpad
WAIT WINDOW 'Selected menu pad of ' + mmenu + ' is ' + mpad NOWAIT
IF mpad = 'QUIT'
        DEACTIVATE MENU mainmenu
        WAIT WINDOW 'End of DEACTIVATE MENU example' NOWAIT
        RELEASE MENU mainmenu
ENDIF
RETURN

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

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

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

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