RosettaCodeData/Task/GUI-enabling-disabling-of-controls/LiveCode/gui-enabling-disabling-of-controls-1.livecode
2016-12-05 23:44:36 +01:00

18 lines
590 B
Text

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