Enables HTBasic to branch upon receipt of a specified event
Example
ENABLE EVENT @Myscrollbar, "CHANGED"
ENABLE EVENT @String1, "KEYSTROKE"
Syntax
ENABLE EVENT @w_hndl, event_name
Item
Description
Range
event_name
name of an event this widget can enable (string expression)
depends on the widget
w_hndl
widget handle name
any valid name
Description
ENABLE EVENT enables branching upon receipt of an event specified by ON EVENT. ON EVENT automatically performs an ENABLE EVENT for the specified widget and event. For example, the following line enables program branching for the event CHANGED. The actual branch taken is defined by an ON EVENT command.
ENABLE EVENT @Myscrollbar, "CHANGED"
If an ON EVENT statement has been defined for a widget and an event, when the event occurs an event-initiated branch results. Use DISABLE EVENT to temporarily suspend branching. For example, you may want the program to accomplish some task without interruption. After that task is accomplished, you can use ENABLE EVENT to re-enable the program's sensitivity to that event.
While the event is disabled, it can still be logged. Then, when it is re-enabled, the branch will be taken. Only one occurrence of the event will be logged. You must have at least one currently defined event branch in your program to accept inputs from the mouse or keyboard. The events can all be disabled and still accept inputs.