Views have a bounding rectangle that can be different than the rectangle that is defined by their position, width and height.
simpleboundslayout uses that bounding rectangle to lay out a set of views along an x or y axis, similar to
<simplelayout> that uses a views position and its width or height.
The example below shows the difference when using simpleboundslayout vs. a simplelayout
for a set of three views.
Example 73. Example of simpleboundslayout
<canvas height="100">
<include href="utils/layouts/simpleboundslayout.lzx"/>
<view bgcolor="0x8A8A8A" x="10" y="10">
<view width="60" height="60" bgcolor="teal"/>
<view width="60" height="60" bgcolor="blue" rotation="45"/>
<view width="60" height="60" bgcolor="teal"/>
<simpleboundslayout axis="x"/>
</view>
<view bgcolor="0x8A8A8A" x="250" y="10">
<view width="60" height="60" bgcolor="teal"/>
<view width="60" height="60" bgcolor="blue" rotation="45"/>
<view width="60" height="60" bgcolor="teal"/>
<simplelayout axis="x"/>
</view>
</canvas>
| Name (CSS property) | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
axis
|
string | String | y | read/write |
| The axis in which this layout operates, 'x' or 'y'. | ||||
spacing
|
expression | any | 0 | read/write |
| A pixel amount to use between each view in the layout. | ||||
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
addSubview, ignore, lock, releaseLayout, removeSubview, reset, setLayoutOrder, swapSubviewOrder, unlock, update
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.