HTBasic Help
×
Menu
Index

Disable Event Command

 
DISABLE EVENT
Prevents HTBasic from branching upon receipt of a
specified event
______________________________________________________________________
 
Legal Usage                Keyboard Executable                Yes
                 Programmable                        Yes
                 In an IF...THEN...                        Yes
 
Example                                DISABLE EVENT @Myscrollbar,"CHANGED"
Statements                                DISABLE EVENT @String1, "KEYSTROKE"
 
Syntax
 
 
Item
Description
Range
event name
name of an event this widget can disable (string expression)
depends on the widget
widget handle
name identifying a widget
any valid name
 
Description
 
DISABLE EVENT disables HTBasic from branching upon receipt of a specified event. You can use DISABLE EVENT to temporarily suspend the 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.
 
A disabled event can still be logged. Then, when the event is reenabled, the branch will betaken. Only one occurrence of the event will be logged. The events can all be disabled and still accept inputs.
 
There are three important differences between DISABLE EVENT and OFF EVENT:
 
·
DISABLE EVENT temporarily disables the event, while OFF EVENT permanently deactivates the event
 
·
Only one occurrence of the event will be logged if the event is disabled with DISABLE EVENT. Therefore, the specified branch will be taken once the event is reenabled with ENABLE EVENT.
 
·
The event will NOT be logged and the branch will never be taken if the event is deactivated with OFF EVENT.
 
In the following example, the first statement enables the event ALARM for the METER
widget. Then, the second statement disables the event.
 
    ENABLE EVENT @Meter, ALARM .
                .
                .
    DISABLE EVENT @Meter, ALARM