<tabelement>

A tab element view that is opened and closed in conjunction with a tabslider.

JavaScript: tabelement

Extends Basetabelement

tabelement is a non-visual view contained within a tabslider that opens and closes when directed by a tabslider. In practice, the tabelement class can be extended to create whatever look and feel is desired. The following example demonstrates how that is done.

<canvas height="200">
  <include href="lz/tabslider.lzx" />

  <!-- Custom tabelement -->
  <class name="mytabelement" extends="tabelement" bgcolor="blue">
    <!-- classroot.parent = reference to tabslider -->
    <view placement="header" bgcolor="red" height="100%" width="100%">
      <text name="title" x="2" y="1" text="${classroot.text}"/>
    </view>
  </class>

  <!-- Use custom tabelement -->
  <tabslider bgcolor="yellow" width="100" height="200" spacing="2">
    <mytabelement text="Tab 1">
      <view bgcolor="white" width="30" height="30"/>
    </mytabelement>
    <mytabelement text="Tab 2"/>
    <mytabelement text="Tab 3"/>
  </tabslider>
</canvas>
Attributes
Name Usage Type (Tag) Type (JS) Default Category
headerpadding Tag & JS expression any 0 setter
 

Insets the header art on the x-axis. Default is 0.


inset_bottom Tag & JS expression any   setter
 

The bottom inset for content appearing within a tabelement. Default is the containing tabslider's inset_bottom value.


inset_left Tag & JS expression any   setter
 

The left inset for content appearing within a tabelement. Default is the containing tabslider's inset_left value.


inset_right Tag & JS expression any   setter
 

The right inset for content appearing within a tabelement. Default is the containing tabslider's inset_right value.


inset_top Tag & JS expression any   setter
 

The top inset for content appearing within a tabelement. Default is the containing tabslider's inset_top value.


shadowheight Tag & JS expression any 4 setter
 

The height of the shadow. Default is 4.


shadowvisible Tag & JS expression any true setter
 

Boolean to set the shadow of this tabelement. Default is true.


text_x Tag & JS expression any 4 setter
 

The x position of the text field in the header area. Default is 4.


text_y Tag & JS expression any   setter
 

The y position of the text field in the header area. Default is centered.



Attributes inherited from Basecomponent

doesenter, enabled, hasdefault, isdefault, style, styleable, text

Attributes inherited from Baselistitem

onselected, selected

Attributes inherited from Basetabelement

contentvisible, headerheight, hideonclose, itemclassname, minheight, onclosestart, onclosestop, onopenstart, onopenstop

Attributes inherited from Basevaluecomponent

value

Attributes inherited from Node

class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes

Attributes inherited from View

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


Methods

setHilite()
tabelement.setHilite(dohilite)

Overrides baselistitem's setHilite.

Parameters
Name Type Desc
dohilite boolean true if you want to hilite


Methods inherited from basecomponent

doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, setStyle, setTint, updateDefault

Methods inherited from basetabelement

closed, openned, setSelected

Methods inherited from basevaluecomponent

getValue

Methods inherited from LzNode

animate, applyConstraint, applyData, childOf, completeInstantiation, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption

Methods inherited from LzView

addProxyPolicy, addSubview, bringToFront, construct, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getHeight, getID3, getMouse, getPan, getTotalTime, getVolume, getWidth, init, 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

Events inherited from LzNode

onconstruct, ondata, oninit

Events inherited from LzView

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