Documentation
CheckBox
Creates a checkbox.
If created in the "elements" area, the checkbox sets a property to True or False when accepted.
The parameter "name" defines which property is set.

Parameters
| Parameter | Description |
|---|---|
| caption | visible caption |
| download (optional) | (default: "") If this parameter is not an empty string and the output of the onChange script is a Data-URL, the output is downloaded as a text file with the name of the download parameter. (since Symcon 7.0) |
| enabled (optional) | (default: true) If true, the CheckBox can be used, otherwise it is displayed as deactivated (since Symcon 5.2) |
| items (optional) | (default: []) List of configuration elements which are only displayed while the CheckBox is activated. The values of the elements are retained if it is deactivated again (cannot be changed) (since Symcon 9.1) |
| itemsPosition (optional) | (default: 0) The position of the configuration elements defined by "items" (since Symcon 9.1) 0: The elements are displayed below the CheckBox 1: The elements are displayed to the right of the CheckBox |
| link (optional) | (default: false) If this parameter is true, the output of the onChange script is opened as a link. If it is false, the output is displayed as a dialog in the configuration form. (since Symcon 6.0) |
| name (optional) | Name of the checkbox/the property to be set |
| onChange (optional) | (default: "") Script, which is executed with a click when the checkbox is changed. If the script consists of several lines, the individual lines can also be defined as an array (arrays are supported since version 6.0). It has the same properties as onClick of the Button (since Symcon 5.2) |
| type | CheckBox |
| value (optional) | (default: false) The value of the CheckBox - If there is an associated property, this parameter is overwritten by the property in the elements area (since Symcon 5.2) |
| visible (optional) | (default: true) If true, the CheckBox is visible, otherwise it is invisible (since Symcon 5.2) |
| width (optional) | Fixed width of the checkbox in pixels or % as a string, e.g. "40%" or "250px". If the value is not set or "", the width is automatically selected based on the caption (since Symcon 5.3) |
Example
{ "type": "CheckBox", "name": "status", "caption": "emulate Status" }
//Configuration elements which are only displayed while the CheckBox is activated
{ "type": "CheckBox", "name": "UseProxy", "caption": "Use proxy",
"itemsPosition": 1,
"items": [
{ "type": "ValidationTextBox", "name": "ProxyHost", "caption": "Host" },
{ "type": "NumberSpinner", "name": "ProxyPort", "caption": "Port" }
]
}