RosettaCodeData/Task/GUI-enabling-disabling-of-controls/LiveCode/gui-enabling-disabling-of-controls-1.livecode

19 lines
590 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
command enableButtons v
switch
case v <= 0
put 0 into fld "Field1"
set the enabled of btn "Button1" to true
set the enabled of btn "Button2" to false
break
case v >= 10
put 10 into fld "Field1"
set the enabled of btn "Button1" to false
set the enabled of btn "Button2" to true
break
default
set the enabled of btn "Button1" to true
set the enabled of btn "Button2" to true
put v into fld "Field1"
end switch
end enableButtons