The <list>
tag creates a list which may contain
<listitem>
s. Subclasses of
listitem
, such as
textlistitem
, may be used as well.
<list>
provides basic layout and a selection API
. If there are more items than specified in the
shownitems
attribute, a
scrollbar
will be provided.
<canvas
height
="100
">
<list
x
="10
" y
="10
">
<textlistitem
text
="item 1
" value
="1
" selected
="true
"/>
<textlistitem
text
="item 2
" value
="2
"/>
<textlistitem
text
="item 3
" value
="3
"/>
</list
>
</canvas
>
When you have more items on your list than appear to the user, or if you are creating a list from data and then changing the data that is represented by the list, you should use "lazy replication" and data pooling, respectively, to optimize performance of your lists. See Performance Tuning for a discussion.
See the list_example.lzx for more list use cases.
A list containing listitems and providing selection capabilities.Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
autoscrollbar
|
expression | any | true | read/write |
If true, a scrollbar will show up automatically when there are more items than shownitems. | ||||
border_bottom
|
expression | any | this.bordersize | read/write |
The size of the bottom border. | ||||
border_left
|
expression | any | this.bordersize | read/write |
The size of the left border. | ||||
border_right
|
expression | any | this.bordersize | read/write |
The size of the right border. | ||||
bordersize
|
expression | any | 1 | read/write |
The size in pixels for this list. | ||||
border_top
|
expression | any | this.bordersize | read/write |
The size of the top border. | ||||
minheight
|
number | Number | 24 | read/write |
minumum height of the list | ||||
scrollable
|
expression | any | false | readonly |
scrollbarclassname
|
string | String | vscrollbar | read/write |
The name of the class to instantiate as our scrollbar. | ||||
shownitems
|
expression | any | -1 | read/write |
The number of items that are displayed. This value will ignored if this view attempts to draw past the canvas boundary. | ||||
spacing
|
expression | any | 0 | read/write |
The number of pixels that items should be spaced from one another. | ||||
tracking
|
expression | any | false | read/write |
Toggles the mousedown tracking. |
dataoption, defaultselection, itemclassname, multiselect, toggleselected
changed, ignoreform, rollbackvalue, submit, submitname, value
doesenter, enabled, hasdefault, isdefault, style, styleable, text
aaactive, aadescription, aaname, aasilent, aatabindex, align, backgroundrepeat, bgcolor, cachebitmap, capabilities, clickable, clickregion, clip, colortransform, context, contextmenu, cornerradius, cursor, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hasdirectionallayout, hassetheight, hassetwidth, height, layout, loadratio, mask, opacity, pixellock, playing, proxyurl, resource, resourceheight, resourcewidth, rotation, shadowangle, shadowblurradius, shadowcolor, shadowdistance, showhandcursor, source, stretches, subviews, tintcolor, totalframes, unstretchedheight, unstretchedwidth, usegetbounds, valign, visibility, visible, width, x, xoffset, xscale, y, yoffset, yscale
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
addItem() |
---|
Parameter Name | Type | Description |
---|---|---|
txt | String | the text for the item. |
val | Object | the value for the item. |
ensureItemInView() |
---|
select() |
---|
Parameter Name | Type | Description |
---|---|---|
v | lz.view | the view to select (may be an array, when multiselect == true) |
addItem, clearSelection, getItem, getItemAt, getNumItems, getSelection, getText, getValue, moveSelection, removeAllItems, removeItem, removeItemAt, select, selectItem, selectItemAt, selectNext, selectPrev, setHilite
commit, destroy, findForm, init, rollback, setChanged, setValue, toXML
acceptValue, doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, presentValue, setStyle, setTint, updateDefault
bringToFront, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getCurrentTime, getDepthList, getDisplayObject, getID3, getMouse, getNextSelection, getPan, getPrevSelection, getProxyURL, getTotalTime, getVolume, init, isBehind, isInFrontOf, isMouseOver, measureHeight, measureWidth, play, proxyurl, searchSubviews, seek, sendAAEvent, sendBehind, sendInFrontOf, sendToBack, setAccessible, setAttributeRelative, setColor, setColorTransform, setPan, setProxyPolicy, setSource, setVolume, shouldYieldFocus, stop, unload, updateResourceSize
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
onaddsubview, onbackgroundrepeat, onblur, onclick, onclickable, onclip, oncontext, oncornerradius, ondblclick, onerror, onfocus, onframe, onframesloadratio, ongesture, onheight, onkeydown, onkeyup, onlastframe, onload, onloadratio, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmousetrackout, onmousetrackover, onmousetrackup, onmouseup, onmouseupoutside, onopacity, onplay, onplaying, onremovesubview, onshadowangle, onshadowblurradius, onshadowcolor, onshadowdistance, onstop, ontimeout, ontouch, onvisible, onwidth, onx, ony
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.