MCheckBox

From HTML5 Builder
Jump to: navigation, search

The MCheckBox component provides a checkbox, a box with a boolean value: it can be either checked or unchecked.

Usage

Change the State

To change the state of a MCheckBox 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).checkboxradio("refresh");

Get the State

You can get the state of a MCheckBox control: whether is is marked or not.

The value returned by the following PHP method will be either true (marked) or false:

$this->ComponentName->getChecked();

The following JavaScript expression will evaluate to true (marked) 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].
    • 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].

Client-side Events

Documented in the RPCL Reference.

Server-side Features

Properties, Methods and Events

Documented in the RPCL Reference.

See Also

  • Alternatives: CheckBox (web applications).
Personal tools