Difference between revisions of "LGUI2:expander"

From Lavish Software Wiki
Jump to navigation Jump to search
(Created page with "A LavishGUI 2 expander element is a headered Content Container element, where the header can be placed on an edge of the Content, and the Content i...")
 
Line 40: Line 40:
 
         "type": "button",
 
         "type": "button",
 
         "content": "Okay, go!",
 
         "content": "Okay, go!",
        "backgroundBrush": { "color": [ 0.0, 0.0, 0.0 ] }
 
 
       }
 
       }
 
     ]
 
     ]

Revision as of 15:32, 3 July 2018

A LavishGUI 2 expander element is a headered Content Container element, where the header can be placed on an edge of the Content, and the Content is collapsible.

Defining an expander element

An expander element is a Content Container with additional properties.

Expander element properties
header An Element definition specifying the content to be placed in the headerContainer
headerContainer An Element definition specifying the container to place the header in
expanded A boolean value specifying whether the content is expanded (otherwise, it is collapsed)

Examples

A simple expander
{
  "type": "expander",
  "borderThickness": 1,
  "borderBrush": { "color": [ 1.0, 1.0, 1.0 ] },
  "padding": 3,
  "header": "My Expander!",
  "content": {
    "type": "stackpanel",
    "uniform": true,
    "children": [
      {
        "type": "checkbox",
        "content": "Go ahead, break everything"
      },
      {
        "type": "checkbox",
        "content": "Please don't break everything"
      },
      {
        "type": "button",
        "content": "Okay, go!",
      }
    ]
  }
}