Forms 9: How to disable a Menu item at runtime

From: Thomas Eichner <thomas.eichner_at_utanet.at>
Date: 17 Dec 2003 01:32:18 -0800
Message-ID: <e1730c0e.0312170132.63a852c5_at_posting.google.com>



Hi all,

I'm currently working with Forms 9 an am expiriencing a problem with the Default Menu.

First of all i want to use the Default Menu. That works fine.

in my Form I have an Query-only block and when the Form is loading i want to disable for example the RECORD/INSERT Menu-item.

I get the frm-41067 error: Menu item not found. invalid id. Below there is my code for the trigger WHEN-NEW-FORM-INSTANCE

DECLARE

	menuitem_name VARCHAR2(30):='RECORD.INSERT';
	mi_id MenuItem; 
BEGIN 
	mi_id := Find_Menu_Item( menuitem_name ); 
	Set_Menu_Item_Property(mi_id,ENABLED,PROPERTY_FALSE); 
END; i also tried

SET_MENU_ITEM_PROPERTY('Record.Insert',ENABLED,PROPERTY_false);

i get the same error.

i cannot access the item. is there a possibity to change the properties of the Menu from a Form-Trigger at runtime?

Thanks in advance,

Thomas Received on Wed Dec 17 2003 - 10:32:18 CET

Original text of this message