[Control] selectField

Part of: mobl::ui::generic

Arguments:

  • value : String the variable to bind the control to
  • options : [(String, String)] array of tuples where the first represents a value, and the second a human-friendly description (to appear in the user interface).
  • onchange : Callback event triggered when the value of the this control changes.
  • style : Style = selectFieldStyle style to apply to control
  • optionStyle : Style = null style to apply to each option

A drop-down select box.

Example:

var language = "english"
group {
  item { selectField(language, [("english", "English"),
                              ("dutch", "Dutch")]) }
}
mobl/ui/generic/selectfield.txt · Last modified: 2013/10/01 02:29 (external edit)