A script-enabled browser is required for this page to function properly.

GET_MENU_ITEM_PROPERTY Built-in

Description

Returns the state of the menu item given the specific property. You can use this Built-in function to get the state and then you can change the state of the property with the SET_MENU_ITEM_PROPERTY Built-in.

Syntax

FUNCTION GET_MENU_ITEM_PROPERTY
(menuitem_id MenuItem,
property
NUMBER);

FUNCTION GET_MENU_ITEM_PROPERTY
(menu_name.menuitem_name VARCHAR2,
property
NUMBER);

Built-in Type unrestricted function

Returns VARCHAR2

Enter Query Mode yes

Parameters

menuitem_id 
 
The unique ID Oracle Forms assigns to the menu item when you create it. Use the FIND_MENU_ITEM Built-in to return the ID to an appropriately typed variable. Datatype is MenuItem.
 
menu_name.menuitem_name 
 
The name you gave the menu item when you created it. If you specify the menu item by name, include the qualifying menu name, for example, menu_name.menuitem_name. Datatype is VARCHAR2.
 
property 
 
Specify one of the following constants to retrieve information about the menu item:

CHECKED Returns the VARCHAR2 string TRUE if a check box menu item is checked, FALSE if it is unchecked. Returns the VARCHAR2 string TRUE if a radio menu item is the selected item in the radio group, FALSE if some other radio item in the group is selected. Returns TRUE for other menu item types.

ENABLED Returns the VARCHAR2 string TRUE if a menu item is enabled, FALSE if it is disabled (thus grayed out and unavailable).

ICON_IN_HTOOLBAR Returns the VARCHAR2 string TRUE if an icon should appear on the horizontal menu toolbar of a form.

ICON_IN_MENU Returns the VARCHAR2 string TRUE if an icon should be displayed in the menu beside the menu item.

ICON_IN_VTOOLBAR Returns the VARCHAR2 string TRUE if an icon should appear (represented by an icon) on the vertical menu toolbar of a form.

ICON_NAME Returns the file name of the icon resource associated with a menu item having the Icon in Menu property set to TRUE.

LABEL Returns the VARCHAR2 string for the menu item label.

VISIBLE Returns the VARCHAR2 string TRUE if a menu item is visible, FALSE if it is hidden from view.

GET_MENU_ITEM_PROPERTY Examples

/*

** Built-in: GET_MENU_ITEM_PROPERTY
** Example: Toggle the enabled/disable status of the menu
** item whose name is passed in. Pass in a string
** of the form 'MENUNAME.MENUITEM'.
*/
PROCEDURE Toggle_Enabled( menuitem_name VARCHAR2) IS
mi_id MenuItem;
BEGIN
mi_id := Find_Menu_Item( menuitem_name );
IF Get_Menu_Item_Property(mi_id,ENABLED) = 'TRUE' THEN
Set_Menu_Item_Property(mi_id,ENABLED,PROPERTY_FALSE);
ELSE
Set_Menu_Item_Property(mi_id,ENABLED,PROPERTY_TRUE);
END IF;
END;


SET_MENU_ITEM_PROPERTY Built-in