HTBasic Help
×
Menu
Index

Enable Event Command

 
ENABLE EVENT
Enables HTBasic to branch upon receipt of a specified event
______________________________________________________________________
 
Legal Usage                Keyboard Executable                Yes
                 Programmable                        Yes
                 In an IF...THEN...                        Yes
 
Example                                ENABLE EVENT @Myscrollbar, "CHANGED"
Statements                                ENABLE EVENT @String1, "KEYSTROKE"
 
Syntax
 
 
Item
Description
Range
event name
name of an event this widget can enable (string expression)
depends on the widget
widget handle
name identifying a widget
any valid name
 
Description
 
ENABLE EVENT enables HTBasic to branch upon receipt of a specified event. The branch to be taken and the defined event are specified by the ON EVENT command. The ON EVENT command automatically creates 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 suspendthe effects an event would have on your program.
 
For example, you may want the program to accomplish some task without interruption. After that task is accomplished, you can use ENABLE EVENT to reenable the program's sensitivity to that event.
 
While the event is disabled, it can still be logged. Then, when it is reenabled, 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.