92
DISABLE CONTROL Directive
Disable Control
Formats
1. Disable Single Control: DISABLE CONTROL ctl_id1[:sub_id][,ctl_id2[:sub_id]...][,ERR=stmtref]
2. Disable Multiple Controls: DISABLE CONTROL bin_list$[,ERR=stmtref]
Where:
bin_list$ One or more three-byte binary strings identifying controls:
BIN(control_ID,2)+$00$ for most controls or
BIN(control_ID,2)+bin(sub_id,1) for radio buttons
ctl_id
Value of the control(s) to disable. Numeric expression, integer. If you
include a list, use the comma as the separator.
stmtref
Program line number or label to transfer control to.
sub_id
Unique radio button ID. Numeric expression (range 1 to 254).
Description
Use the DISABLE CONTROL directive to notify ProvideX that you want the specified
control (button, check box, radio button, etc.) disabled. The bin_list$ expression will
support up to 30 controls (90 characters).
To re-enable the control use the ENABLE CONTROL directive.
Example
00010
print 'CS'
00020
button 10,@(1,1,20,2)="Show Message"
00030
obtain x
00040
if ctl=10 then msgbox "Hello World","Button Message"
00050
if ctl=4 then stop
00060
if ctl=1 then enable control 10; print @(24,1),"Enabled "
00070
if ctl=2 then disable control 10; print @(24,1),"Disabled"
00080
goto 0030
See Also