[Control] accordion

Part of: mobl::ui::generic

Arguments:

  • sections : [(String, Control)] an array of tuples, each tuple representing a section. The first element is the section's title, the second the control to use to render the section (no arguments).
  • activeSection : String (optional): the title of the selected tab, can be used to manipulate the active section.

An accordion control.

Example:

control section1() {
  label("My first section")
}
control section2() {
  label("My second section")
}
control section3() {
  label("My third section")
}
accordion([("Section 1", section1), ("Section 2", section2),
           ("Section 3", section3)])
// or:
accordion([("Section 1", section1), ("Section 2", section2),
           ("Section 3", section3)], activeSection="Section 2")
mobl/ui/generic/accordion.txt · Last modified: 2013/10/01 02:29 (external edit)