Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Initiazing mouse double event from Return Key

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am using a table frame to populate data. I have some code executing in the double click event of each column of the table frame.
Can I initialize this double click event when "Enter Key" is Pressed in keyphysical or keychar event.

Please Help

Thanks in advance
 
bphillip,

Yes, you can, though due to the design of the Paradox event model, it's better to take a slightly different approach:

1. Consolidate your existing mouseDouble() into a custom method designed to accept parameters that indicate which column has been clicked/triggered.

2. Modify your mouseDouble() events to call your custom method with the approprtiate parameters, e.g. the ones that indicate which column was double-clicked.

3. In KeyPhysical(), add code to determine the active column and then pass that to your custom method.

You can indeed trigger mouse events from ObjectPAL, however, in order to most effectively mimic the events generated when the user does this, you need to trigger multiple events in very short order. For example, there are times when you need to trigger a mouseDown() and a mouseUp(), instead of triggering a mouseClick().

It's esoteric, I'll admit, but the subtleties do exist. The best way to handle this is to move your logic into custom methods and then trigger those from the actual events.

Besides, it's better programming practice. ;-)

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top