[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|            HIDE MENU            |
+---------------------------------+
HIDE MENU <menu name1>
        [, <menu name2> ... ]
        | ALL [SAVE]

-----------------------------------
Hides menu bar.
-----------------------------------

HIDE MENU removes the specified menu bar, a set of menu bars or all menu
bars from the screen or a window but not from memory.  A menu bar must
first be created with the DEFINE MENU command before it may be hidden.
Hiding a menu bar is not the same as deactivating it.  When a menu bar
is hidden, it stays resident in memory and may be displayed on the
screen or in a window with ACTIVATE MENU or SHOW MENU commands.

You hide a specific menu bar by including its name or hide a set of menu
bars with a list of menu bar names.  Specify the keyword ALL to hide all
defined menu bars.

You can place an image of a menu bar on the screen or in a window by
including the SAVE option.  Placing an image of a menu bar on the screen
is useful during program development and testing.  Menu bar images may
be cleared from the screen or a window with the CLEAR command.

Clauses
-------

<menu name1> [, <menu name2> ... ]
        List of menu bars to hide.

ALL
        Hides all defined menu bars.

SAVE
        Places image of menu bar on screen or in a window.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example, a menu bar named MAINMENU is defined with four menu
pads.  When a menu pads is chosen, two values are passed to the TMENU
routine.  The TMENU routine hides the MAINMENU menu bar and displays a
message.

CLEAR
SET SYSMENU OFF
DEFINE MENU mainmenu
DEFINE PAD invoices  OF mainmenu PROMPT ' \<INVOICES '  AT 1,00
DEFINE PAD customers OF mainmenu PROMPT ' \<CUSTOMERS ' AT 1,20
DEFINE PAD inventory OF mainmenu PROMPT ' I\<NVENTORY ' AT 1,40
DEFINE PAD quit      OF mainmenu PROMPT ' \<QUIT '      AT 1,60

ON SELECTION PAD invoices  OF mainmenu ;
        DO tmenu WITH MENU(), PAD()
ON SELECTION PAD customers OF mainmenu ;
        DO tmenu WITH MENU(), PAD()
ON SELECTION PAD inventory OF mainmenu ;
        DO tmenu WITH MENU(), PAD()
ON SELECTION PAD quit OF mainmenu ;
        DO tmenu WITH MENU(), PAD()

ACTIVATE MENU mainmenu

PROCEDURE tmenu
PARAMETER mmenu, mpad
HIDE MENU mainmenu
@ 2,0 SAY 'Selected menu pad of ' + mmenu + ' is ' + mpad
WAIT
CLEAR
IF mpad = 'QUIT'
        SET SYSMENU AUTOMATIC
        DEACTIVATE MENU
ENDIF
RETURN

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

See Also:  ACTIVATE MENU, DEFINE MENU, DEFINE PAD, SHOW MENU

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

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