36. radio-buttons

radio-buttons(key, value, ..., key, value)

Inserts in generated content a panel containing radio button controls (single selection) or check box controls (multiple selection). These controls can be used to edit the value of the element which is the target of the CSS rule. If "attribute, attribute_name" is specified, these controls can be used to edit the value of an attribute of this target element.

KeyValueDefaultDescription
attributeQualified name of attribute to be editedNo defaultWithout this parameter, the control is used to edit the value of the element for which the control has been generated.
labelsList of strings separated by new lines ("\A ")None (use values as labels)Labels used for the radio buttons or the check boxes. The order of labels must match the order of values.
valuesList of strings separated by new lines ("\A ")None (dynamically determined by examining the data type of value to be edited)

In single selection mode, clicking on radio button #N sets the element or attribute value being edited to value string #N.

In multiple selection mode clicking on check box #N adds/removes value string #N to/from the selected set.

The value strings in the selected set are then joined using the character specified by separator (' ' by default).

The resulting string is assigned to the element or attribute value being edited.

columnsPositive integermax(10, number of values)Maximum number of columns used to layout the panel containing the radio buttons or check boxes. Do not specify rows and columns for the same control.
rowsPositive integerNoneMaximum number of rows used to layout the panel containing the radio buttons or check boxes. Do not specify rows and columns for the same control.
selectionsingle | multiplesingleSpecifies single or multiple selection mode.
separatorSingle character stringNone (values are separated by any type of white space characters)Character used to join selected value strings in multiple selection mode. The resulting string is assigned to the element or attribute value being edited.

Key, value, ..., key, value may also specify style parameters.

Examples:

radio-buttons(rows, 2)

radio-buttons(attribute, value,
              labels, "Cyan\A Yellow\A Magenta\A Black")

radio-buttons(attribute, value,
              labels, "Cyan\A Yellow\A Magenta\A Black",
              values, "cyan\A yellow\A magenta\A black",
              selection, multiple,
              separator, ",")