This class is a container for a group of
baselistitems. To use
baselist, baselistitem
must be subclassed to provide a visual representation of the list
item. It supports single select by default. Set
multiselect to true to allow multiple selection
(shift-click for a range, control-click for an arbitrary set).
Contained list items may be declared inside the list, such as:
or replicated from data:
Optimizing Lists
If your lists represent data from a datapath, there are two
optimizations that you may want to consider:
- pooling
- If you will be changing the data that is represented by the list
after it has been created, you can set
dataoption="pooling". For more about pooling see the
datapath ??? attribute
and the example in list.
- lazy
- If there are more items in the list than will be visible and all
list items are the same size (for example, in a scrolling list or
combobox), you should set dataoption="lazy". For more about lazy
replication see the datapath
??? attribute,
LzLazyReplicationManager, and the example in
list.
Attributes inherited from <view>
aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, cachebitmap, clickable, clickregion, clip, contextmenu, cursor, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, opacity, pixellock, playing, proxyurl, resource, resourceheight, resourcewidth, rotation, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visibility, visible, width, x, xoffset, y, yoffset
Attributes inherited from <node>
classroot, cloneManager, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, subnodes
Methods
-
-
baselist.addItem(text : String, value : Object);
Add an item to the end of the list. This method is not available
with dataoption="lazy" or dataoption="resize"
(use the data APIs instead).
-
-
baselist.clearSelection();
Clear the current selection.
-
-
baselist.getItem(value : Object);
Find a particular item by value. This method is not available with
dataoption="lazy" or dataoption="resize"
(use the data APIs instead).
-
-
baselist.getItemAt(index : Number);
Get a particular item by its index. This method is not available
with dataoption="lazy" or dataoption="resize"
(use the data APIs instead).
-
-
Get the number of items in the list.
-
-
Get the selection for the list. Normally this method returns
views, but if dataoption="lazy" or dataoption="resize",
it will return datapointers.
-
-
-
-
Get the value(s) for the list.
-
-
baselist.moveSelection(dir : Number);
Move the selection to the next or previous view. This method not
available with dataoption="lazy" or dataoption="resize"
-
-
baselist.removeAllItems();
Removes all items from the list.
-
-
baselist.removeItem(value : Object);
Find the first item with the specified value and remove it from
the list. This method is not available with dataoption="lazy"
or dataoption="resize"
(use the data APIs instead).
-
-
baselist.removeItemAt(index : Number);
Find the item at the specified index and remove it from the list.
This method is not available with dataoption="lazy"
or dataoption="resize"
(use data APIs instead).
-
-
baselist.select(item : lz.view);
-
-
baselist.selectItem(value : Object);
Select an item by value. This method is not available with
dataoption="lazy" or dataoption="resize".
-
-
baselist.selectItemAt(index : Number);
-
-
Move the selection to the next view. This method not available
with dataoption="lazy" or dataoption="resize".
-
-
Move the selection to the previous view. This method not
available with dataoption="lazy" or dataoption="resize".
-
-
baselist.setHilite(v : lz.view);
Set which view has the hilite.
Methods inherited from <view>
bringToFront, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getID3, getMouse, getNextSelection, getPan, getPrevSelection, getProxyURL, getTotalTime, getVolume, init, measureHeight, measureWidth, play, proxyurl, releaseLayouts, searchSubviews, seek, sendAAEvent, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAccessible, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setProxyPolicy, setProxyURL, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisibility, setVisible, setVolume, setWidth, setX, setXOffset, setY, setYOffset, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize
Methods inherited from <node>
animate, applyConstraint, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setData, setDatapath, setOption, setSelected, updateData
Events inherited from <view>
onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onframesloadratio, onheight, onkeydown, onkeyup, onlastframe, onload, onloadratio, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onvisible, onwidth, onx, ony