DisableMenuItem function

Syntax

DisableMenuItem(BARNAME.menubar_name, ITEMNAME.menuitem_name)

Description

Use the DisableMenuItem function to disable (make unavailable) the 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.)

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

DisableMenuItem(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.