HideMenuItem function
Syntax
HideMenuItem(BARNAME.menubar_name, ITEMNAME.menuitem_name)
Description
Use the HideMenuItem function to hide a specified menu item. To apply this function to a pop-up menu, use the PrePopup Event of the field with which the pop-up menu is associated.
If you’re using this function with a pop-up menu associated with a page (not a field), the earliest event you can use is the PrePopup event for the first “real” field on the page (that is, the first field listed in the Order view of the page in Application Designer.)
When a menu is first displayed, all menus are visible by default, so there is no need for a function to re-display a menu item that has been hidden.
Parameters
| Parameter | Description |
|---|---|
|
menubar_name |
Name of the menu bar that owns the menu item, or, in the case of pop-up menus, the name of the pop-up menu that owns the menu item. |
|
menuitem_name |
Name of the menu item. |
Returns
None.
Example
HideMenuItem(BARNAME.MYPOPUP1, ITEMNAME.DO_JOB_TRANSFER);
Restrictions on Use With a Component Interface
This function is ignored (has no effect) when used by a PeopleCode program that’s been called by a Component Interface.