Summary
A checkbox is a view which can be toggled on or off. The current state of the checkbox can be obtained and onClick() can be used to receive change notifications on the checkbox.
void setChecked(checked)
boolean getChecked()
Example
root = new View("ipad-portrait");
checkbox = root.createCheckbox(400,200);
checkbox.setChecked(true);
function click(sender) {
document.writeln("checkbox is " + sender.getChecked());
}
checkbox.onClick(click);
document.wait();
setChecked
Sets the state of a checkbox to be checked or unchecked
void setChecked(checked)
Parameters
checked - true if checked, otherwise unchecked
Return Value
none
Notes
getChecked
Returns true if the checkbox is checked
boolean getChecked()
Parameters
none
Return Value
true if the checkbox is checked, otherwise false
Notes