Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

F2 key on char or option event (OpenInsight 32-bit Specific)

At 05 MAR 2002 01:17:07PM Roman wrote:

Hi,

Can someone suggest a way to trap F2 or any other character

on option or char events?

Thanks in advance,

Roman


At 05 MAR 2002 02:28PM Donald Bakke wrote:

Roman,

You do this by creating a menu on the form and assign the accelerator key as F2. By default the accelerator key is Alt-DownArrow. You can simply change the accelerator key or add a new menu item and copy the QuickEvent logic from the original.

Keep in mind, however, that F2 is the default key for putting edittable cells into editmode. This will prevent your OPTIONS feature from working as expected. You can also change this key stroke but it takes a little programming. If you are interested let me know and I will find a link or copy the code in a response.

[email protected]

SRP Computer Solutions, Inc.


At 05 MAR 2002 03:28PM Roman wrote:

Don,

I should`ve been more specific with my original question.

There are four edilines with a DIFFERENT popup for each of them.

There`s also an Option menu with F2 as a hotkey. I need to envoke an appropriate popup with F2. Here is my code in Edit.Option menu:

BEGIN CASE

 CASE CtrlEntID=MODIFIER"
     val=Popup(@WINDOW,'','Popup_CPT_MODS')
 CASE CtrlEntID=PROC_TYPE"
     val=Popup(@WINDOW,'','Popup_PROC_TYPES')
 CASE OTHERWISE$
     val=MSG(@WINDOW,'There are no option for this field')	

END CASE

Obviously,CtrlEntID doesn`t return an editline name so I decided to detect F2 character in each editline separately.


At 05 MAR 2002 03:45PM Donald Bakke wrote:

Roman,

Well you could always get the FOCUS property of the active window and then apply your case logic. However, the general method for assigning different popups for each control is to associate your popup calls with the OPTIONS event for each control and then have the menu send an OPTIONS event to that control.

[email protected]

SRP Computer Solutions, Inc.


At 06 MAR 2002 04:29PM Roman wrote:

Don,

Thank you very much for your help.

Focus property worked fine.

Best regards,

Roman

View this thread on the forum...