This class is a container for a group of
baselistitem
s. 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, 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
Attributes inherited from <node>
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
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, 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
Methods inherited from <node>
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events inherited from <view>
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