You can disable a menu item in Oracle Forms in design time and at runtime. Design time you need to set enabled property manually for the menu and at runtime, you can disable the menu item using SET_MENU_ITEM_PROPERTY built-in. Below are the examples of both methods.
Steps To Disable Menu Item at Design Time
- Open the menu module in Oracle Forms.
- Expand the menu node and find the menu item you want to disable.
- Right click on the menu item and click on the Property Palette.
- In property palette window, under functional set the Enabled property to No.
- Save the menu and compile.
Now your menu item would be displayed as the disabled menu item.
Disabling Menu Item at Runtime
The following is the example of SET_MENU_ITEM_PROPERTY built-in to disable a sub-menu item on the When-New-Form-Instance trigger.
SET_MENU_ITEM_PROPERTY('department_record_menu.edit', ENABLED, PROPERTY_FALSE);
The department_record_menu is the parent item for edit menu. To disable the whole parent menu, specify the parent menu name only, as shown in the below example.
SET_MENU_ITEM_PROPERTY('department_record_menu', ENABLED, PROPERTY_FALSE);
- Create Alerts in Oracle Forms
- Create Static LOV in Oracle Forms
- Create Drop-Down lists in Oracle Forms