The Add Trigger dialog helps you to associate an event (also called as a trigger) with an object in the AppBuilder (.w) file. An event is an action associated with a trigger and on an object.
Note: The Add Trigger option is available only with the AppBuilder (.w ) files.
To add trigger for an object:
1. Open the .w procedure file in the ABL Editor.
2. Open the Add Trigger dialog by doing one of the following:
From the Source menu, select Add Trigger.
From the right-click context menu, select Source > Add Trigger.
The Add Trigger dialog appears.
3. From the Widget drop-down, select an object. This drop-down contains all the objects that are present in the current design window.
4. From the Event category drop-down, select an event category. For details on the event categories, see Add Trigger dialog.
5. If you select an event category other than Keyboard Event from the Event category drop-down, go to step 6. If you select Keyboard Events as the event category, follow these steps:
a. In the Key label field, enter a label for the keyboard event such as F1 or F2.
b. The Key function displays the pre-defined function associated with the key label such as Help for F1 or GO for F2. If there is no pre-defined function associated with the Key label, then the same key label text is displayed in the Key function field.
c. For the Generate code by option, select either Key Function or Key label.