FutureBasic Logo

<<    Index    >> FutureBasic

checkbox   statement / function



Statement syntax
checkbox tag, enabled, state, title, rect, wndTag

Function syntax
state = checkbox(tag)

Description
The checkbox statement puts a new checkbox in the current output window, or alters an existing checkbox's characteristics. The checkbox function returns the state of the checkbox and is equivalent to calling fn ButtonState.

Parameters
Parameter
Description
tag A number (1 through 1000000) that you assign when you create the checkbox and that you refer to when altering or closing the checkbox. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the checkbox.
enabled A boolean value which specifies whether the checkbox should be enabled or disabled.
state Sets the state of the checkbox.
NSControlStateValueOn
NSControlStateValueOff (default)
NSControlStateValueMixed
title The text that appears to the right of the checkbox as a CFString expression.
rect The checkbox's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the checkbox.
(ii) A CGRect value
wndTag An optional parameter for when the checkbox's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
 
Dialog event
_btnClick
 

See also
button

Apple documentation
NSButton