Home » Developer & Programmer » Forms » Set menu item property enabled/disabled
Set menu item property enabled/disabled [message #241552] Wed, 30 May 2007 00:19 Go to next message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
I have the following code in Forms 6i :

BEGIN
SELECT GD_PICT_PATH INTO :PICTPATH
FROM GRADE_DETAIL
WHERE GD_ITEM_CODE=REC.CODE
AND GD_GRADE_CODE=REC.GD_GRADE_CODE;
EXCEPTION
WHEN NO_DATA_FOUND THEN null;
END;
if nvl(:PICTPATH,'u')<>'u' then
message (:PICTPATH);
Set_Menu_Item_Property('MENU137.SHOW_PICTURE',ENABLED,PROPERTY_true);
else
Set_Menu_Item_Property('MENU137.SHOW_PICTURE',ENABLED,PROPERTY_false);
end if;

But my menu item is always shown disabled even when
there is a value for :pictpath...I tried all known options like blockname.variable.
Any one can detect whats wrong ???


Re: Set menu item property enabled/disabled [message #241586 is a reply to message #241552] Wed, 30 May 2007 02:06 Go to previous messageGo to next message
imen_mr2004
Messages: 22
Registered: October 2006
Location: tunisia
Junior Member
hi,

pleaz tell me if the initial status of ur menu is enabled or disabled,
Re: Set menu item property enabled/disabled [message #241630 is a reply to message #241586] Wed, 30 May 2007 04:03 Go to previous messageGo to next message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
Hi..

I have not given any initial status now. Earlier I tried
it in when_new_form_instance trigger like :
Set_Menu_Item_Property('MENU137.SHOW_PICTURE',ENABLED,PROPERTY_false);

But result was same...

thanks

Re: Set menu item property enabled/disabled [message #241786 is a reply to message #241552] Wed, 30 May 2007 11:03 Go to previous messageGo to next message
imen_mr2004
Messages: 22
Registered: October 2006
Location: tunisia
Junior Member
u must focus if the name of the menu item is "SHOW_PICTURE",
because some times it gives another name as "G_12" or something like this,

focus on ur menu and tell me,

good luck
Re: Set menu item property enabled/disabled [message #241903 is a reply to message #241786] Wed, 30 May 2007 23:46 Go to previous message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
Hi friend...
I guess Focus means navigation in Forms as I gather from Forms Help.In my form navigation is simple.

Also I tried the following menu item code of 'Show_pictue' menu_item.

DECLARE
MI_ID MENUITEM;
BEGIN
mi_id := Find_Menu_Item('MENU137.SHOW_PICTURE');

SELECT GD_PICT_PATH INTO :PICTPATH
FROM GRADE_DETAIL
WHERE GD_ITEM_CODE=:ITEM_CODE
AND GD_GRADE_CODE=:GRADE;

IF NVL(:pictPATH,'U')<>'U' THEN
Set_Menu_Item_Property(MI_ID,ENABLED,PROPERTY_TRUE);
else
Set_Menu_Item_Property(MI_ID,ENABLED,PROPERTY_FALSE);
END IF;
END;

But still no result !!!!

Previous Topic: message on trigger
Next Topic: LOV Problem
Goto Forum:
  


Current Time: Mon Dec 05 11:14:21 CST 2016

Total time taken to generate the page: 0.06470 seconds