Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : ActiveX Control Support : Handling events : Handling ActiveX control events : Coding event procedure names
 
Coding event procedure names
ABL supports two types of OCX event procedures, distinguished by the procedure name:
*Control-bound event procedures that handle a specific event for a specific control instance
*Generic event procedures that handle a specific event for all ActiveX controls in the application
Note: Names of event procedures are not case sensitive.
The names for control-bound event procedures contain three parts, delimited by a period (.). Each part can be quoted if it contains embedded spaces:
1. The name of the control-frame (the NAME attribute value of the control-frame widget
2. The name of the ActiveX control (the Name property value set in the Property Editor)
3. The name of the event that is handled by the procedure
As with all internal procedures that you add in the AppBuilder, the PROCEDURE statement and procedure name is not visible in the Section Editor. However, this is one that you or the AppBuilder might code:
PROCEDURE CtrlFrame.CSSpin.SpinUp .
This begins the definition for a procedure to handle the SpinUp event for the control named CSSpin in the control-frame named CtrlFrame.
The names for generic event procedures contain two parts, delimited by a period (.):
1. ANYWHERE
2. The name of the event that is handled by the procedure
The AppBuilder does not provide a mechanism to generate generic event procedures. You must code these yourself in the AppBuilder using the New Procedure dialog box, or you can add them to an external procedure file. For example:
PROCEDURE ANYWHERE.SpinUp .
A generic event procedure with this name handles the SpinUp event for any control instance that does not have a control-bound event procedure defined for the SpinUp event.