How Do I Define an Event Handler to Be Executed Only When the User is Parked on a Specific Control? (Magic xpa 3.x)
It is easy to capture events using the Event logic unit. But what if you want an event to be triggered only when the user is located on a specific control? You can do that using the Control name property of the event.
In this example, we selected the “First_Name” control for the system event F7. That means, when the user presses the F7 key, the handler will only execute if the user is parked on the control named “First_Name”.
Hint: If you need to have one event handler handle a variety of controls, use the HandledCtrl() function within the event handler, as discussed in the How Do I Identify from Which Control an Event Was Triggered? topic.
The Online and Rich Client Samples projects (program LG16 and RLG16)