A non-visual container that animates and coordinates the sliding of basetabelements
A basetabslider coordinates the opening and
closing of its basetabelements contained within
its scope . basetabslider and
basetabelement have no visual aspects. The
tabslider class (which extends
basetabslider) does contain a visual UI and
shows how basetabslider can be extended to
create your own visual framework for a unique tab slider.
An example of the use of these classes is shown below. In order to make the base classes visible, background colors have been assigned to them.
<canvas height="220">
<include href="base/basetabslider.lzx"/>
<basetabslider bgcolor="yellow" width="100"
height="200" mintabheight="40"
spacing="2" slideduration="300">
<basetabelement clickable="true" bgcolor="red" width="100%"/>
<basetabelement clickable="true" bgcolor="red" width="100%"/>
<basetabelement clickable="true" bgcolor="red" width="100%"/>
</basetabslider>
</canvas>
The mintabheight specified for a
basetabslider applies to all of its
basetabelements except those
basetabelements that define it for themselves,
as demonstrated in the following example.
<canvas height="220">
<include href="base/basetabslider.lzx"/>
<basetabslider bgcolor="yellow" width="100"
height="200" mintabheight="40"
spacing="2" slideduration="300">
<basetabelement clickable="true" bgcolor="red" width="100%"/>
<basetabelement clickable="true" bgcolor="red" width="100%" minheight="15"/>
<basetabelement clickable="true" bgcolor="red" width="100%"/>
</basetabslider>
</canvas>
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| inset_bottom | Tag & JS | expression | any | 8 | setter |
|
The bottom inset for content appearing within a tabelement. Default is 8. |
|||||
|
|
|||||
| inset_left | Tag & JS | expression | any | 8 | setter |
|
The left inset for content appearing within a tabelement. Default is 8. |
|||||
|
|
|||||
| inset_right | Tag & JS | expression | any | 8 | setter |
|
The right inset for content appearing within a tabelement. Default is 8. |
|||||
|
|
|||||
| inset_top | Tag & JS | expression | any | 8 | setter |
|
The top inset for content appearing within a tabelement. Default is 8. |
|||||
|
|
|||||
| mintabheight | Tag & JS | expression | any | 22 | setter |
|
The default height of every tab when closed. Default is 22. |
|||||
|
|
|||||
| slideduration | Tag & JS | expression | any | 300 | setter |
|
The duration of the tabs openning and closing. Default is 300. |
|||||
|
|
|||||
| spacing | Tag & JS | expression | any | 0 | setter |
|
The spacing of the tabs. Default is 0. |
|||||
|
|
|||||
doesenter, enabled, hasdefault, isdefault, style, styleable, text
dataoption, defaultselection, itemclassname, multiselect, toggleselected
class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes
aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, clickable, clickregion, clip, cursor, defaultplacement, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, onblur, onclick, ondata, ondblclick, onfocus, onkeydown, onkeyup, onmousedown, onmouseout, onmouseover, onmouseup, onselect, opacity, options, pixellock, play, resource, resourceheight, resourcewidth, rotation, selectiontype, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visible, width, x, xoffset, y, yoffset
| addItem() | ||
| basetabslider.addItem(txt) | ||
|
Add the new item (instantiated using itemclassname) and a new tabelement. |
||
| Parameters | ||
| Name | Type | Desc |
| txt | String | The name of the tabelement. |
|
|
||
| calcAvailableHeight() | ||
| basetabslider.calcAvailableHeight() | ||
|
Calculate the height available to place items in basetabslider. |
||
|
|
| doAddSubview() | ||
| basetabslider.doAddSubview(v) | ||
| Parameters | ||
| Name | Type | Desc |
| v | None | |
|
|
||
| openNext() | ||
| basetabslider.openNext() | ||
|
Open next tabelement. Nothing will be opened if the last basetabelement is encountered. |
||
| Returns | ||
| Type | Desc | |
| boolean | true if it was able to open the next tabelement. | |
|
|
||
| openTab() | ||
| basetabslider.openTab(tabelement, withAnimation) | ||
|
Deprecated: use this.select(atabview) instead. |
||
| Parameters | ||
| Name | Type | Desc |
| tabelement | basetabelement | tabelement to open. |
| withAnimation | boolean | unused. |
|
|
||
| select() | ||
| basetabslider.select(item) | ||
|
Select a tabelement. |
||
| Parameters | ||
| Name | Type | Desc |
| item | LzView | the tabelement to select. |
|
|
||
| setHeight() | ||
| basetabslider.setHeight(h) | ||
|
Set the height of the basetabslider. |
||
| Parameters | ||
| Name | Type | Desc |
| h | Number | the height. |
|
|
||
doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, setStyle, setTint, updateDefault
applyData, commit, findForm, init, rollback, setChanged, setValue, toXML, updateData
addItem, clearSelection, getItem, getItemAt, getNumItems, getSelection, getText, getValue, moveSelection, removeItem, removeItemAt, select, selectItem, selectItemAt, selectNext, selectPrev, setHilite
animate, applyConstraint, childOf, completeInstantiation, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption
addProxyPolicy, addSubview, bringToFront, construct, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getHeight, getID3, getMouse, getPan, getTotalTime, getVolume, getWidth, measureHeight, measureWidth, play, releaseLayouts, removeProxyPolicy, searchParents, searchSubviews, seek, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisible, setVolume, setWidth, setX, setY, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize
| Events | |
| Name | Description |
| onchanged | None |
| onvalue | None |
onaddsubresource, onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onheight, onlastframe, onload, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onwidth, onx, ony
Copyright © 2002-2007 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.