8.7  <enum>

An enumeration setting. Its representation is a dropdown list widget with items defined by <item> child tags.

8.7.1  Attributes

Name Type Default Value Description
bind string The name of the variable or property to which the configuration element is bound.
callback function [new in 0.34] 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 [new in 0.34] 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.
items tuple [new in 0.34] The items which are children of an enum can be accessed via this variable. You will get a list of tuples in the form of (label, value).

8.7.2  Examples

<enum label="Face:" bind="clockface" help="What the clock looks like.">

  <item label="Plain" value="clock.png"/>
  <item label="gDesklets" value="gdclock.png"/>
  <item label="Royal Air Force" value="rafclock.png"/>
  <item label="GNOME" value="gnomeclock.png"/>
  <item label="OS-X" value="osXclock.png"/>
  <item label="Grandpa's pocket watch" value="pocketwatch.png"/>

</enum>