Adding event handlers
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Adding event handlers to controls is a two-step process:
- Subscribe to one of the events that the control supports by choosing it in the Events tab of the Properties view.
- Code the event-handling method, using the ABL Editor.
When you choose an event in the Events tab of the
Properties view, the Visual Designer generates the appropriate
SUBSCRIBE statement in the source code. It also generates the
event-handling method. Progress Developer Studio for OpenEdge automatically opens the class
file in the ABL Editor (or switches to it if it is already open) and positions the cursor in
the method definition.
SUBSCRIBE statement
is automatically added to the source code, and the cursor is positioned in the method
definition.In the Customer form you will enable the UltraGrid to save changes made to a field by running SaveRecord() after a field is edited. Also, you will enable the deletion of the contents of a field by running DeleteRecord() when the DELETE key is pressed.
To add event handlers to ultraGrid1: