8.13  <unit> [new in 0.34]

A configuration item for setting geometry values. The user can enter a value and select from the supported measurement units.

8.13.1  Attributes

Name Type Default Value Description
as_cm() string The value of the unit in centimeters.
as_in() string The value of the unit in inches.
as_percent() string The value of the unit as a percentage of it's parent container's size.
as_pt() string The value of the unit in DTP points (1 pt = 1/72 inch).
as_px() string The value of the unit in pixels.
bind string The name of the variable or property to which the configuration element is bound.
digits integer 2 The number of decimal digits.
callback function A callback function which is called every time the value changes. The callback takes the name of the bound property and the new value as arguments.
enabled boolean true Whether the config item is enabled. Disabled items appear greyed out.
help string The tooltip text for the element in the configuration dialog.
label string The label text for the element in the configuration dialog.
min float 0.0 The minimal value allowed.
max float 9999.0 The maximal value allowed.

8.13.2  Examples

<unit label="Width:" bind="Dsp.win.width" min="0.5" max="50.0"
      help="The width of the display."/>