Progress
Programming
Handbook
Trigger Definition
You can set up a user-interface trigger when you define or create the widget or subsequently in an ON statement.
For static widgets, triggers can be either of two types: definitional or run-time. A definitional trigger is specified in the statement that defines the widget and is set up at compile time. A run-time trigger is specified in an ON statement and is set up at run time when that statement is executed.
The following procedure defines two static buttons. It sets up a definitional trigger for the Quit button and a run-time trigger for the Next button:
In an ON statement, you can specify more than one event-widget pair for the same trigger code.
In the following example, the items in the sounds menu all share the same trigger:
Note that, by using SELF within the trigger, the behavior is customized for each widget. The trigger displays the value of the PRIVATE–DATA attribute for the selected widget and then disables that widget.
If you use the LIKE option in defining a variable or widget, the widget you are defining inherits any triggers defined on that other widget. If triggers are inherited in this way, you cannot specify additional definitional triggers. However, if there are no triggers to inherit, you may specify definitional triggers.
For dynamic widgets, triggers are always run-time triggers. You can specify the run-time trigger in the statement that creates the widget or in a subsequent ON statement.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |