<basetabslider>
A non-visual container that animates and coordinates the sliding of basetabelements

JavaScript: lz.basetabslider

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>
This class is a non-visual container that animates and coordinates the sliding of basetabelements.

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
inset_bottom expression any 8 read/write
  The bottom inset for content appearing within a tabelement.
inset_left expression any 8 read/write
  The left inset for content appearing within a tabelement.
inset_right expression any 8 read/write
  The right inset for content appearing within a tabelement.
inset_top expression any 8 read/write
  The top inset for content appearing within a tabelement.
mintabheight expression any 22 read/write
  The default height of every tab when closed.
slideduration expression any 300 read/write
  The duration of the tabs openning and closing.
spacing expression any 0 read/write
  The spacing of the tabs.

Attributes inherited from <basevaluecomponent>

type, value

Methods

addItem()
basetabslider.addItem(txt : String, value : Object);
Add the new item (instantiated using itemclassname) and a new tabelement.
Parameter Name Type Description
txt String The name of the tabelement.
value Object The value of the tabelement.

calcAvailableHeight()
basetabslider.calcAvailableHeight();
Calculate the height available to place items in basetabslider.

doAddSubview()
basetabslider.doAddSubview(v : lz.view);
Called when an item is added to the tabslider.
Parameter Name Type Description
v lz.view view to be added.

openNext()
basetabslider.openNext();
Open next tabelement. Nothing will be opened if the last basetabelement is encountered.
Returns Type Description
  boolean true if it was able to open the next tabelement.

openTab()
basetabslider.openTab(tabelement : basetabelement, withAnimation : boolean);
[Caution] This method is deprecated
use this.select(atabview) instead
Parameter Name Type Description
tabelement basetabelement tabelement to open.
withAnimation boolean unused.

select()
basetabslider.select(item : lz.view);
Select a tabelement.
Parameter Name Type Description
item lz.view the tabelement to select.

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <baselist>

onitemclassname, onselect

Events inherited from <baseformitem>

onchanged, onvalue

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy