Documentation
qx:dock (qx.ui.layout.Dock)
Docks children to one of the edges.
Features
- Percent width for left/right/center attached children
- Percent height for top/bottom/center attached children
- Minimum and maximum dimensions
- Prioritized growing/shrinking (flex)
- Auto sizing
- Margins and Spacings
- Alignment in orthogonal axis (e.g. alignX of north attached)
- Different sort options for children
Item Properties
- edge (String): The edge where the layout item
should be docked. This may be one of
north,east,south,westorcenter. (Required) - width (String): Defines a percent width for the item. The percent width, when specified, is used instead of the width defined by the size hint. This is only supported for children added to the north or south edge or are centered in the middle of the layout. The minimum and maximum width still takes care of the elements limitations. It has no influence on the layout's size hint. Percents are mainly useful for widgets which are sized by the outer hierarchy.
- height (String): Defines a percent height for the item. The percent height, when specified, is used instead of the height defined by the size hint. This is only supported for children added to the west or east edge or are centered in the middle of the layout. The minimum and maximum height still takes care of the elements limitations. It has no influence on the layout's size hint. Percents are mainly useful for widgets which are sized by the outer hierarchy.
Example
var layout = new qx.ui.layout.Dock();
var w1 = new qx.ui.core.Widget();
var w2 = new qx.ui.core.Widget();
var w3 = new qx.ui.core.Widget();
w1.setHeight(200);
w2.setWidth(150);
var container = new qx.ui.container.Composite(layout);
container.add(w1, {edge:"north"});
container.add(w2, {edge:"west"});
container.add(w3, {edge:"center"});
Detailed Description
Using this layout, items may be “docked” to a specific side of the available space. Each displayed item reduces the available space for the following children. Priorities depend on the position of the child in the internal children list.
External Documentation
Extended documentation and links to demos of this layout in the qooxdoo wiki.LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk &
Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.