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. ====== Radio Button Group ====== {{ :scripting:dialogs:radiobutton_group.png|Radio Button Group Demo}} Simplified control for managing group of radio buttons with single selection variable. ===== Properties ===== ^ Property ^ Default Value ^ Description ^ | **id** | empty | id (name) of the script data object (integer) associated with control | | **align** | stretched | [[scripting:dialogs:align|Alignment]] of the control | | **required** | false | required property of the control (if control is initial, "positive" buttons will be disabled) | | **selected_index** | -1 (no selection) | Selected radio button index. Will be taken if no variable is bound (variable in dialog storage with name corresponding to //id// property) | ===== Items ===== Radio Button Group control contains //Items//. The //item// may be: simple radio button control, [[scripting:dialogs:columnbreak|column break]] or [[scripting:dialogs:sectionbreak|section break]] layout items. ==== Item ==== Properties of Radio Button Group item: ^ Property ^ Default Value ^ Description ^ | **text** | empty | Item text | ===== Example ===== <file javascript radiobutton_group.hejs> var varStorage = new Storage(); var dialog_template = '@<dialog title="Test Dialog" resizing="both"> \ <radio_button_group id="options" selected_index="0"> \ <item text="Option 1"/> \ <item text="Option 2"/> \ <columnbreak/> \ <item text="Option 3"/> \ <item text="Option 4"/> \ <item text="Option 5"/> \ <sectionbreak/> \ <item text="Option 6"/> \ <item text="Option 7"/> \ </radio_button_group> \ <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 returns: " + dialog(dialog_template, varStorage)); </file>