33. spinner
Prev | Chapter 5. Content objects | Next

## 33. spinner

spinner(`key`, `value`, ..., `key`, `value`)

Inserts in generated content a spinner control. This control can be used to edit the value of the element which is the target of the CSS rule. If "`attribute, `attribute_name``" is specified, this control 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.
columns | Positive integer | Automatically computed when possible; otherwise 10 | Width of the text field in characters.
country | Upper-case, two-letter codes as defined by ISO-3166. Example: "ES". | Country of default locale. | Participates in specifying the locale to use.
data-type | `byte` | `short` | `int` | `long` | `float` | `double` | `double` | Base data type of attribute or element value being edited.
language | Lower-case, two-letter codes as defined by ISO-639. Example: "es". | Language of default locale. | Participates in specifying the locale to use.
max | Number | No maximum. | Maximum value for the number edited using the spinner.
min | Number | No minimum. | Minimum value for the number edited using the spinner.
pattern | Pattern supported by `java.text.DecimalFormat` | A simple pattern which depends on data-type. | Specifies how number is to be parsed and formatted.
step | Strictly positive number | 1 | The number is incremented or decremented by this amount when the user clicks the arrow buttons of the spinner.
variant | Vendor or browser-specific code. Example: "Traditional_WIN". | Variant of default locale. | Participates in specifying the locale to use.

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

Example:

    count {
        content: spinner(attribute, value,
                         data-type, byte);
    }

    weight {
        content: spinner(min, 0,
                         max, 1,
                         step 0.01,
                         pattern, "0.00####",
                         language, en,
                         country, "US");
    }

See also number-field.

Prev | Up | Next
32. set-attribute-button | Home | 34. text