====== Radio Button ====== {{ :scripting:dialogs:radiobutton.png|Radio Button Demo}} Standalone radio button control to show exclusive choices. ===== Properties ===== ^ Property ^ Default Value ^ Description ^ | **id** | empty | id (name) of the script data object (boolean) associated with control | | **title** | empty | title of the control. | | **align** | stretched | [[scripting:dialogs:align|Alignment]] of the control | | **groupstart** | false | Indicator of group start. Group ends by next radio button with //groupstart// set or by last standalone radio button control. Only one radio button in group can be selected. | | **checked** | false | Checked state of the control. Will be taken if no state variable is bound (variable in dialog storage with name corresponding to //id// property) | ===== Events ===== ^ Event ^ Description ^ | **[[scripting:dialogs:events:onclick|onclick]]** | event handler (function name) to be called, if radio button box is clicked| ===== Example ===== var varStorage = new Storage(); var dialog_template = '@ \ \ \ \ \ \ \ \ \ \ \ \ \ \ @'; Output().writeln("Dialog returns: " + dialog(dialog_template, varStorage)); function onOption() { alert("Control Text: " + this.Text + "\r\nControl Name: " + this.Name); }