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. ====== Tri State Check Box ====== Check box control with ability to have intermediate state in addition to set/unset. {{ :scripting:dialogs:tri_state_checkbox.png|}} ===== 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 | | **state** | false | Checked state of the control. See list of available values below | ^ State Value ^ Description ^ | **true** | Checked state | | **false** | Not checked | | **none** | Intermediate state | | **checked** | Checked state | | **unchecked** | Not checked | | **indeterminate** | Intermediate state | ===== Events ===== ^ Event ^ Description ^ | **[[scripting:dialogs:events:onclick|onclick]]** | event handler (function name) to be called, if check box is clicked| ===== Example ===== <file javascript tri_state_checkbox.hejs> var varStorage = new Storage(); var dialog_template = '@<dialog title="Test Dialog" resizing="both"> \ <tri_state_checkbox id="check" title="Never show me anything ever again" state="none"/> \ <tri_state_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>