Show pageOld revisionsBacklinksAdd to bookBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Check Box ====== Check box control with ability to set/read boolean flags. {{ :scripting:dialogs:checkbox.png?200|Check Box demo}} \\ ===== Properties ===== ^ 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 | [[scripting:dialogs:align|Alignment]] of the control | | **checked** | false | Checked state of the control | ===== Events ===== ^ Event ^ Description ^ | **[[scripting:dialogs:events:onclick|onclick]]** | event handler (function name) to be called, if check box is clicked| ===== Example ===== <file javascript 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); } </file>