One of the ways to extend data entry form functionality is handling of the events generated during user work with forms.
An event handler enables the user to execute the specified operation each time the event occurs.
Main purpose of connection of application macros and event handlers:
Creating hyperlink triggers. If executing macros contained in the connected objects is required as their operations.
Creating formulas.
Event handling.
Signature of the specified macro can contain parameters.
After links between forms or form elements are set up, if required, follow the step:
Event handler is a unit created in the Fore language.
To connect a unit, select the Set Handler item in the drop-down menu of the Handler button on the toolbar. The Set Handler dialog box opens:
Set:
Unit. Select the unit in the drop-down list with repository objects or start entering unit name in the search string. One unit can be selected.
Class. The list becomes available after the unit is selected. Select a class, which contains an event handler, in the drop-down list. One class can be selected. Fore events executed during navigation between the sheets - OnBeforeSheet and OnAfterSheet.
Finish the selection by clicking the Apply button. The button becomes available after the class is selected.
To undo the event handler use, select the Reset item of the Handler button on the toolbar.
See also:
Building Data Entry Form | Working with Ready Data Entry Form