Raising Events from Menus and Push Buttons (Magic xpa 3.x)
In addition to the Raise Event operation, there are other ways to raise events. You can define push buttons and menu entries that raise events when activated.
The Push Button control has the ability to raise an event. This is done via the Raise Event property for the button models or the Event Type and Event properties for the control in the Form Designer. Zoom from this property to select the event you want the push button to raise. The defined event is raised when the push button is activated in runtime. The available event types are: System, Internal, User, and None.
Important:
|
If we want to execute a defined logic sequence as the end user clicks on a push button, the proper methodology should be: Creating a User event, creating the logic in the user event handler, and setting the raise event property of the push button to raise the user event. You should refrain from using the Click Internal Event to handle the push button activation.
|
In the Menu repository you can define a menu entry to raise an event. You can set a menu entry to raise an event by setting its entry type to Event. Zoom from the Menu Params column in the Event menu entry to select the event you want this menu entry to raise. The available event types are: System, Internal, and User.
Note:
|
Activating a Push Button control or activating an Event menu entry raises the event asynchronously, as though set with Wait=No.
|