constantlayout
extends
<LzLayout>
, and therefore it is responsible for
arranging all of the subviews for the view that it is attached to. The
attributes of a view that constantlayout
effects are the x
and y
values, and as its name implies constantlayout
sets all of the subviews to the same value.
Example 69. Using constantlayout
<canvas
height
="100
">
<view
bgcolor
="red
">
<view
width
="80
" height
="80
" bgcolor
="teal
"/>
<view
width
="60
" height
="60
" bgcolor
="silver
"/>
<view
width
="40
" height
="40
" bgcolor
="green
"/>
<constantlayout
axis
="x
" value
="10
"/>
</view
>
</canvas
>
In this example the teal, silver and green views are aligned on the horizontal (x) axis; the layout element's value attribute (10) causes the subviews to be shifted ten pixels to the right.
Example 70. Aligning on the horizontal axis.
<canvas
height
="100
">
<view
bgcolor
="red
">
<view
width
="80
" height
="80
" bgcolor
="teal
"/>
<view
width
="60
" height
="60
" bgcolor
="silver
"/>
<view
width
="40
" height
="40
" bgcolor
="green
"/>
<constantlayout
axis
="y
" value
="10
"/>
</view
>
</canvas
>
Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
axis
|
string | String | y | read/write |
The axis in which this layout operates either 'x' or 'y'. | ||||
value
|
expression | any | read/write | |
The constant value that is applied to the attribute ( defined in 'axis' as 'x' or 'y' ) of each subview 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.