Class Banana.Controls.TabSlider
Extends
Banana.Controls.Panel.
- Methods borrowed from class Banana.Controls.Panel:
- getTagName
- Methods borrowed from class Banana.UiControl:
- addControl, addCss, addCssClass, getAttribute, getAttributes, getClientId, getCss, getCssClass, getDimensions, getHtml, getHtmlAttributes, getState, getStyle, getStyleProperty, hasCssClass, registerEvents, removeAttribute, removeCssClass, removeState, setAttribute, setClientId, setCss, setEnabled, setState, setStyle, setVisible, switchCssClass, triggerEvent, unregisterEvents
- Methods borrowed from class Banana.Control:
- applyToChildren, bind, clear, createComponents, findControl, generateUniqueId, getControls, getDomEventTypes, getFirstUiControl, getId, getPage, getParent, getProxy, hasBind, invalidateDisplay, onPreInvalidateContents, onWindowResize, remove, render, setId, setPage, setParent, unbind, unload, updateDisplay
Defined in: TabSlider.js.
Creates a Tab Slider. A Tabslider is a horizontaly sliding component. Content can be added by using the addContent(content,tabname) method. Optionally setUseUrlHistory can be used to have tabslides available in browser history
Example:
var slider = new Banana.Controls.TabSlider();
slider.setStyle("height:300px; width:800px; border:1px solid black;border:1px solid #666666;");
slider.setUseUrlHistory(true);
slider.setSlideSpeed(1000);
slider.addContent(new Banana.Controls.DropDown(),"dropdown");
slider.addContent(new Banana.Controls.CheckBox(),"checkbox");
Adds content which is accessible through a tab link Content can be a control or just plain text. A tabname is required and will appear as a link on top of the control
- Parameters:
- {mixed} content
- can be a control or plain text
- {String} tabname
- Returns:
- {this}
Auto sets height. Because the tabslider uses absolute positioned divs, we have to set the height manually. this function calculates and sets the height based on the current active tab
Set easing type "swing" || "linear" See JQuery animate() method for more information
- Parameters:
- {String} easing
- Returns:
- {this}
sets the text of the next link. clicking on it will advance to the next link
- Parameters:
- {String} text
- Returns:
- {this}
sets the text of the previous link. clicking on it will advance to the previous link
- Parameters:
- {String} text
- Returns:
- {this}
Set transition speed during slide
- Parameters:
- {int} speed
- in ms
- Returns:
- {this}
When true we set the height of the tabslider based on the current active tab. Note that css properties margin and padding are ignored. This is due the fact that the tabslider uses absolute positioned divs. height should be set manually or calculated with javascript.
- Parameters:
- {boolean}
- Returns:
- {this}