LGUI2:dockpanel
Jump to navigation
Jump to search
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" } } ], }