Arranges a set of views along an 'x' or 'y' axis with respect to the bounding rect of the views
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.
<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>
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| axis | Tag & JS | string | String | y | setter |
|
The axis in which this layout operates, 'x' or 'y'. Default value is 'y' |
|||||
|
|
|||||
| spacing | Tag & JS | expression | any | 0 | setter |
|
A pixel amount to use between each view in the layout. Default value is 0 |
|||||
|
|
|||||
defaultplacement, delegates, locked, subviews, updateDelegate, view.layouts
class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes
| setAxis() | ||
| simpleboundslayout.setAxis(a) | ||
|
setter for the axis attribute. The default value is 'y' |
||
| Parameters | ||
| Name | Type | Desc |
| a | string | 'x' oy 'y' |
|
|
||
| update() | ||
| simpleboundslayout.update() | ||
|
This method is usually called automatically when any of the views controlled by the layout change their size in the layout axis, or their visibility. However it can be called directly to force the layout to update |
||
|
|
addSubview, ignore, lock, releaseLayout, removeSubview, reset, setLayoutOrder, swapSubviewOrder, unlock
animate, applyConstraint, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption
| Events |
Copyright © 2002-2005 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.