29. radio-buttons
Prev | Chapter 5. Content objects | Next

## 29. 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.

Key | Value | Default | Description
--- | --- | --- | ---
attribute | Qualified name of attribute to be edited | No default | Without this parameter, the control is used to edit the value of the element for which the control has been generated.
labels | List 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.
values | List 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.
columns | Positive integer | max(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.
rows | Positive integer | None | Maximum 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.
selection | single | multiple | single | Specifies single or multiple selection mode.
separator | Single character string | None (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, ",")

Prev | Up | Next
28. number-field | Home | 30. remove-attribute-button