Extends: Jx.Button
Implements: Jx.ContentLoader
A single tab in a tab set. A tab has a label (displayed in the tab) and a content area that is displayed when the tab is active. A tab has to be added to both a Jx.TabSet (for the content) and Jx.Toolbar (for the actual tab itself) in order to be useful. Alternately, you can use a Jx.TabBox which combines both into a single control at the cost of some flexibility in layout options.
A tab is a Jx.ContentLoader and you can specify the initial content of the tab using any of the methods supported by Jx.ContentLoader::loadContent. You can acccess the actual DOM element that contains the content (if you want to dynamically insert content for instance) via the <Jx.Tab::content> property.
A tab is a button of type toggle which means that it emits the up and down events.
var tab1 = new Jx.Button.Tab({
label: 'tab 1',
content: 'content1',
onDown: function(tab) {
console.log('tab became active');
},
onUp: function(tab) {
console.log('tab became inactive');
}
});Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
| Jx. | Extends: Jx.Button |
| Properties | |
| content | {HTMLElement} The content area that is displayed when the tab is active. |
| Constructor | |
| Jx. | Create a new instance of Jx.Button.Tab. |
| Functions | |
| clicked | triggered when the user clicks the button, processes the actionPerformed event |
Create a new instance of Jx.Button.Tab. Any layout options passed are used to create a Jx.Layout for the tab content area.
| options | {Object} an object containing options that are used to control the appearance of the tab. See Jx.Button, Jx.ContentLoader::loadContent and Jx.Layout::Jx.Layout for valid options. |
triggered when the user clicks the button, processes the actionPerformed event
clicked : function( evt )
triggers loading of content based on options set for the current object.
loadContent: function( element )