How Do I Hide/Reveal a Menu Entry? (Magic xpa 3.x)
You can hide any entry that is on a menu at runtime by using the MnuShow() function. Alternatively, you can use MnuEnable() or MnuCheck() to keep a menu entry from being functional while still being visible.
Note: Menu entries also disappear if a Right is indicated in the Menu properties. and the user doesn’t have the specified Right.
The syntax of MnuShow() is:
MnuShow(MenuName, True/False)
where:
MenuName is the Entry Name of the menu you want to add. In our example, we added an Entry name of “EditMenu” to the default edit menu.
True/False is a ‘TRUE’LOG to show a menu item, ‘FALSE’LOG to hide it. In our example, we have two events set to push buttons, one to show and one to hide the menu.
Note: The menu EntryName is evaluated at runtime, so it doesn’t have to be hard-coded.
Now let’s see what happens.
The Online and Rich Client Samples projects (program MN05 and RMN05)