Rui::Widget::Panel - composite widget
$panel = $someWindow->Panel; $panel->layoutManager(name => 'grid', numCols => 3); $panel->Label(value => 'foo');
A Panel lets you create widgets inside it and lay them out according to some layout manager.
You do not set size or location explicitly for widgets, unless you are
using the rarely used null
layout manager. Instead you set a layout
manager on the parent composite, configure it, and configure any layout
hints on the child widget. The layout manager will layout the widget
according to its configuration and the hints of the children. Layout
will occur after any relevant change to the composite or to the
children, and when the user resizes the window. The layout algorithm
operates automatically, so there is no need to explicitly start layout.
Here is the list of layout managers, and the hints with which they can be configured.
Children are layed out in a horizontal row.
Layout manager keys:
Default is pack=true, justify=false, spacing=3
Layout manager hints:
Children are layed out in a in a box, horizontal or vertical. You can set size and flex on children for the axis of the container orientation. Children are fully stretched on the axis perpendicular to the container orientation.
Layout manager keys:
Layout manager hints:
Children fill the parent completely. Space is divided equally between them.
Layout manager keys:
Children are layed out in a grid.
Layout manager keys:
Default is numCols=1, equalWidth=false, hspacing=vspacing=5
Layout manager hints:
Default is hAlign=begin, vAlign=center, indent=0, hSpan=vSpan=1, hFlex=vFlex=false