Check box control with ability to set/read boolean flags.
Property | Default Value | Description |
id | empty | id (name) of the script data object associated with control |
title | empty | title of the control. Will be taken if no variable is bound (variable in dialog storage with name corresponding to id property) |
align | stretched | Alignment of the control |
checked | false | Checked state of the control |
Event | Description |
onclick | event handler (function name) to be called, if check box is clicked |
- checkbox.hejs
var varStorage = new Storage();
var dialog_template =
'@<dialog title="Test Dialog" resizing="both"> \
<checkbox id="check" title="Never show me anything ever again" checked="true"/> \
<checkbox id="check2" title="I will open message Box" onclick="OnClick"/> \
<group minwidth="75" minheight="23" uniform="true" align="center"> \
<button title="&OK" default="true" returnval="ok"/> \
<button title="&Cancel" returnval="cancel"/> \
</group> \
</dialog>@';
Output().writeln("Dialog 4 returns: " + dialog(dialog_template, varStorage));
function OnClick() {
alert("Control Text: " + this.Text + "\r\nControl Name: " + this.Name);
}