Difference between revisions of "LGUI2:dockpanel"
Jump to navigation
Jump to search
(Created page with "A LavishGUI 2 dockpanel element is a specialized panel where the children are automatically "docked" to a specified edge. == Defining a panel element == A doc...") |
|||
Line 44: | Line 44: | ||
[[Category:LavishGUI 2 Elements]] | [[Category:LavishGUI 2 Elements]] | ||
[[Category:LavishGUI 2 Bordered Elements]] | [[Category:LavishGUI 2 Bordered Elements]] | ||
+ | [[Category:LavishGUI 2 Panel Elements]] |
Revision as of 01:00, 27 June 2018
A LavishGUI 2 dockpanel element is a specialized panel where the children are automatically "docked" to a specified edge.
Defining a panel element
A dockpanel element is defined like a panel, and has no additional properties.
However, all children of a dockpanel may have a "dock" metadata property with one of the following values: "left" "top" "right" "bottom". Note that metadata properties defined in JSON are prefixed with an underscore "_" so a typical usage looks like this
"_dock":"bottom"
Examples
- From DefaultSkin.json
"window.titleBar": { "type": "dockpanel", "children": [ { "type": "button", "_dock": "right", "borderThickness": 1, "borderColor": [ 1, 1, 1, 1 ], "content": "x", "padding": 3, "onMouseButtonMove": { "type": "forward", "elementType": "window", "event": "onCloseButtonClick" } }, { "type": "button", "_dock": "right", "borderThickness": 1, "borderColor": [ 1, 1, 1, 1 ], "content": "_", "padding": 3, "onMouseButtonMove": { "type": "forward", "elementType": "window", "event": "onShadeButtonClick" } } ], }