VALUE: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "Building Blocks Categories" to "Building Blocks") |
m (1 revision imported) |
Latest revision as of 03:04, 11 October 2023
Description
- The VALUE? command obtains the set-state of CHECKBOXes and RADIOBUTTONs. The set-state will be either "set" or "reset".
Syntax
- #handle.ext "value? varName$"
Hints
- Check-boxes and radio-buttons can be either set or reset (cleared). To have your program query the control for its state, issue the command
#handle.ext "value? varName$"
- The variable varName$ will contain the value "set" or "reset". varName$ can be most any name you choose, but must be a string variable.
Example
nomainwin
statictext #1.st1 "Click checkbox to set it or clear it:", 10, 20, 200, 25
checkbox #1.ck1 "Check me", [set], [reset], 50, 50, 100, 25
open "Demo" for window as #1
#1 "trapclose [quit]"
[begin]
wait
[set]
#1.ck1 "value? var$" 'query the state of the checkbox
notice "The checkbox is "; var$ 'display the result
wait
[reset]
#1.ck1 "value? var$"
notice "The checkbox is "; var$
wait
[quit]
close #1
end
Useful Procedures
' Place a useful function or sub using this keyword here