Home » Developer & Programmer » Forms » Function key problem,Urgentttttt.
Function key problem,Urgentttttt. [message #85301] |
Mon, 14 June 2004 21:24 |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Hi,
everyone
In my menu module, functionality is such that if user presses the enter query icon all other accept execute, and canel query icon will be disaabled.I programmed it for this functionality.
it works normaly when i press enter query icon from menu module toolbar, but it does not works when i press 'F7' key , it goes into enter query mode works normaly but it does not disalbe the other menu icons
can any one help me out to resolve it, it is very urgent for me
Prick
|
|
|
Re: Function key problem,Urgentttttt. [message #85302 is a reply to message #85301] |
Mon, 14 June 2004 22:15 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
If it is working from your Icon and not from Function key then there is a Simple reason for it that you wrote the Code of Enabling/Disbaling in your When-button-pressed of the icon but not in the key-exeqry trigger.
Simply write the code or add to the call of your Enabling/diabling Program in Key-triggers & remove them from the When-button-pressed trigger as I hope in your Enter query button you must have written Do_Key('enter-query') which will anyhow call the Function key.
HTH
Regards
Himanshu
|
|
|
Re: Function key problem,Urgentttttt. [message #85306 is a reply to message #85302] |
Mon, 14 June 2004 23:58 |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Hi , Himanshu
How are you?
I am not using buttons as a icons , as i specified i am having the menu module with it's own toolbar. In the menu item code, for the enter query i am disabling all the menu items(iconic), i am also using do_key built in as some of my screen also has a key-entqry trigger attached with them , for some other reasons.
I am using menu module
I am disabling the perticular items in menu item code only, not in when-button-pressed trigger
I am using Do_key built in as well.
ex. DO_KEY('ENTER_QUERY');
But still it does not disable if F7 is pressed, though it goes into enter query mode and works accordingly but without disabling other icons as it does when user presses the enter query icon.
could u come back to me as soon as possible( IF YOUR TIME PERMITS), because this is very urgent for me
PRick
|
|
|
Re: Function key problem,Urgentttttt. [message #85310 is a reply to message #85306] |
Tue, 15 June 2004 03:21 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
Here is an example for you.
In your Key-Entqry trigger paste following code just before ENTER_QUERY built-in:
Enable_Item('QUERY','CANCEL');
Disable_Item('RECORD','SCROLL_UP');
Disable_Item('RECORD','SCROLL_DOWN');
Disable_Item('ACTION','SAVE');
Disable_Item('ACTION','EXIT');
Disable_Item('RECORD','PREVIOUS');
Disable_Item('RECORD','NEXT');
Disable_Item('RECORD','DUPLICATE');
Enable_Item('RECORD','CLEAR');
Disable_Item('EDIT','EDIT');
Enable_Item('HELP','HELP');
Disable_Item('FIELD','DUPLICATE');
Disable_Item('ACTION','CLEAR_ALL');
Disable_Item('BLOCK','NEXT');
Disable_Item('BLOCK','PREVIOUS');
HTH
Regards
Himanshu
|
|
|
Re: Function key problem,Urgentttttt. [message #85316 is a reply to message #85310] |
Tue, 15 June 2004 20:57 |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Hi , Himanshu
I received your mail, I followed accordingly but still
the situation is as it is
Let me give a brief introduction of the problem
1. I have created a menu module, this menu module is not like the default menu module of form. It has it's own Menu's, submenu's and menu items which are specific to the application which is being developed. All other options, which the screen should have, are kept as a ICONIC MENU ITEM on the menu module itself (like execute query, enter query cancel query, save, next record, previous record, block)
All default options are visible on below the menu, having their 'menu item property--iconic to "yes"' ,
Every iconic menu item acts according to the code which is written in their 'menu item code' property
in that code I am DISABLING THE OTHER ICONS WHENEVER ENTER QUERY IS BEING PRESSED, AND AGAIN ENABLEING ALL THE ICONS WHEN EVER CANEL QUERY IS BEING PRESSED
Same menu module is attached to each screen in the application.
It works fine when ever I press F7 instead of enter query button but it does not disable the icons, which should be disabled at that time,
So what i need to do so that the same functionality can be achieved when user presses the relevant function key.
In the application some of the screens are having
Key-entqry attached with them but that i attached for some other reasons.
How can i call SET_MENU_ITEM_PROPERTY built-in in KEY_ENTQRY trigger of form.
How can I achieve this
Please look into it
I am already delayed by one day
please help me out to resolve it
Prick
|
|
|
Re: Function key problem,Urgentttttt. [message #85322 is a reply to message #85316] |
Tue, 15 June 2004 22:08 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi Prick,
I got your point what you are trying to say.
Here is a simple Procedure which you can use to Toggle Menu items properites.
I have menu called XMENU which I have added to my form.
In this Menu under ACTION node there is an Item called
PRINT.
It is Enabled in Normal mode & I need to Disable it in Enter Query mode.
So I add a call of my Procedure Just before ENTER_QUERY in Ke-entqry trigger as follows:
Toggle_Enabled('ACTION.PRINT');
/*
** 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;
Try this out & let me know if it helps.
Regards
Himanshu
|
|
|
Re: Function key problem,Urgentttttt. [message #85332 is a reply to message #85322] |
Wed, 16 June 2004 06:41 |
Prick
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Hi, himanshu
I receieved your reply and i followed the code given by you
yes it is realy working now,
thank you very much
I have to write three triggers in all the screens
those three triggers are
KEY-entqry
KEY-cqury
KEY-exqry
Because i am enabling and disabling some items, when ever relevant operation(enter query, execute query and canel query) is being performed
I have implemented it in one my screen it is working fine, as i am working on it if i will get any problem
i will come back to you
I,Thank you again...
Prick
|
|
|
Goto Forum:
Current Time: Fri Sep 20 00:36:41 CDT 2024
|