BB___VALUE

=VALUE= toc

Description
> The VALUE? command obtains the //set-state// of CHECKBOXes and RADIOBUTTONs. The set-state will be either "set" or "reset".

Hints
Checkboxes and radiobuttons can be either set or reset (cleared). To have your program query the control for its state, issue the command code format="lb" code The variable //varName$// will contain the value "set" or "reset". varName$ can be most any name you choose, but must be a string variable.
 * 1) handle.ext "value? varName$"

Example
code format="lb" 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 code

Useful Functions
code format="lb" Place a useful function using this keyword here code