Radio Button Group

Radio Button Group Demo Simplified control for managing group of radio buttons with single selection variable.

Property Default Value Description
id empty id (name) of the script data object (integer) associated with control
align stretched 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)

Radio Button Group control contains Items. The item may be: simple radio button control, column break or section break layout items.

Item

Properties of Radio Button Group item:

Property Default Value Description
text empty Item text
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="&amp;OK" default="true" returnval="ok"/> \
   		<button title="&amp;Cancel" returnval="cancel"/> \
   </group> \
</dialog>@';
 
Output().writeln("Dialog returns: " + dialog(dialog_template, varStorage));