The Check Box Object
var chk1 = new TCheckBox('CheckBox');
var chk2 = new TCheckBox('Checked CheckBox');
var layHorizontal = new THorizontalLayout();
var wndCheckBoxSample = createWindow('CheckBox Sample');

chk2.setChecked(true);
layHorizontal.add(chk1);
layHorizontal.add(chk2);

wndCheckBoxSample.add(layHorizontal);
showModal(wndCheckBoxSample);

Check box constructor takes three parameters:

var chkSample = new TCheckBox(textLabel, boxPosition /* 0 - left, 1 - right */, padding);

CheckBox Methods and Properties
Method/Property Description
disable Disables check box object
enable Enables check box object
isChecked Returns true if the check box object is checked and false if not
setChecked Checks or unchecks the check box object based on its parameter. Example:
chk.setChecked(false); // uncheck
chk.setChecked(true); // check
setOnChange Sets an event handler for the check status changed event on the check box object. Form: setOnChange(eventHandler)
setOnCheck Sets an event handler for the check event on the check box object. Form: setOnCheck(eventHandler)
setOnUncheck Sets an event handler for the uncheck event on the check box object. Form: setOnUncheck(eventHandler)