CheckBox
The CheckBox component provides a checkbox, a box with a boolean value: it can be either checked or unchecked.
Contents
Usage
Change the State
To change the state of a CheckBox control give its Checked property a value, true
(checked) or false
. You can do it at design time, from the Object Inspector, or at run time, from PHP:
$this->ComponentName->Checked = true;
Or from JavaScript:
("#ComponentName").attr("checked", false);
Get the State
You can get the state of a CheckBox control: whether is is marked or not.
The value returned by the following PHP method will be either true
(checked) or false
:
$this->ComponentName->getChecked();
The following JavaScript expression will evaluate to true
(checked) or false
:
("#ComponentName").attr("checked") !== undefined
Client-side Features
DOM Elements
The component generates the following client-side DOM elements:
- Wrapper (HTMLDivElement). Full web browser support. Access it with
$("#ComponentName_outer").get()[0]
.- span (HTMLSpanElement). Full web browser support. Access it with:
$("#ComponentName_p").get()[0]
.- Checkbox (HTMLInputElement). Full web browser support. Access it with:
$("#ComponentName").get()[0]
.
- Checkbox (HTMLInputElement). Full web browser support. Access it with:
- span (HTMLSpanElement). Full web browser support. Access it with:
$("#ComponentName_l").get()[0]
.- Label (HTMLLabelElement). Full web browser support. Access it with:
$("label[for='ComponentName']").get()[0]
.
- Label (HTMLLabelElement). Full web browser support. Access it with:
- span (HTMLSpanElement). Full web browser support. Access it with:
Client-side Events
- Documented in the RPCL Reference.
Server-side Features
Properties, Methods and Events
- Documented in the RPCL Reference.
See Also
- Alternatives: MCheckBox (mobile interface).
- CheckListBox, RadioButton.