Roo.util.Observable Roo.TabPanel
Package: | Roo |
Defined In: | Roo/TabPanel.js. |
Class: | TabPanel |
Extends: | Roo.util.Observable |
// basic tabs 1, built from existing content
var tabs = new Roo.TabPanel("tabs1");
tabs.addTab("script", "View Script");
tabs.addTab("markup", "View Markup");
tabs.activate("script");
// more advanced tabs, built from javascript
var jtabs = new Roo.TabPanel("jtabs");
jtabs.addTab("jtabs-1", "Normal Tab", "My content was added during construction.");
// set up the UpdateManager
var tab2 = jtabs.addTab("jtabs-2", "Ajax Tab 1");
var updater = tab2.getUpdateManager();
updater.setDefaultUrl("ajax1.htm");
tab2.on('activate', updater.refresh, updater, true);
// Use setUrl for Ajax loading
var tab3 = jtabs.addTab("jtabs-3", "Ajax Tab 2");
tab3.setUrl("ajax2.htm", null, true);
// Disabled tab
var tab4 = jtabs.addTab("tabs1-5", "Disabled Tab", "Can't see me cause I'm disabled");
tab4.disable();
jtabs.activate("jtabs-1");
Options | Defined By | |
---|---|---|
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable |
Method | Defined By | |
---|---|---|
Create a new Roo.TabPanel
|
||
activate
(String/Number id)
:
Roo.TabPanelItem
Activates a {link Roo.TabPanelItem}.
Activates a {link Roo.TabPanelItem}. The currently active one will be deactivated.
|
Roo.TabPanel | |
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
Creates a new {link Roo.TabPanelItem} by looking for an existing element with the provided id -- if it's not found it creates one.
Creates a new {link Roo.TabPanelItem} by looking for an existing element with the provided id -- if it's not found it creates one.
|
Roo.TabPanel | |
addTabItem
(Roo.TabPanelItem item)
Adds an existing {link Roo.TabPanelItem}.
Adds an existing {link Roo.TabPanelItem}.
|
Roo.TabPanel | |
autoSizeTabs
()
Manual call to resize the tabs (if {link resizeTabs} is false this does nothing)
Manual call to resize the tabs (if {link resizeTabs} is false this does nothing)
|
Roo.TabPanel | |
beginUpdate
()
Disables tab resizing while tabs are being added (if {link resizeTabs} is false this does nothing)
Disables tab resizing while tabs are being added (if {link resizeTabs} is false this does nothing)
|
Roo.TabPanel | |
destroy
(Boolean removeEl)
Destroys this TabPanel
Destroys this TabPanel
|
Roo.TabPanel | |
disableTab
(String/Number id)
Disables a {link Roo.TabPanelItem}.
Disables a {link Roo.TabPanelItem}. It cannot be the active tab, if it is this call is ignored.
|
Roo.TabPanel | |
enableTab
(String/Number id)
Enables a {link Roo.TabPanelItem} that is disabled.
Enables a {link Roo.TabPanelItem} that is disabled.
|
Roo.TabPanel | |
endUpdate
()
Stops an update and resizes the tabs (if {link resizeTabs} is false this does nothing)
Stops an update and resizes the tabs (if {link resizeTabs} is false this does nothing)
|
Roo.TabPanel | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
getActiveTab
()
:
Roo.TabPanelItem
Gets the active {link Roo.TabPanelItem}.
Gets the active {link Roo.TabPanelItem}.
|
Roo.TabPanel | |
getCount
()
:
Number
Returns the number of tabs in this TabPanel.
Returns the number of tabs in this TabPanel.
|
Roo.TabPanel | |
getTab
(String/Number id)
:
Roo.TabPanelItem
Returns the {link Roo.TabPanelItem} with the specified id/index
Returns the {link Roo.TabPanelItem} with the specified id/index
|
Roo.TabPanel | |
Roo.util.Observable | ||
hideTab
(String/Number id)
Hides the {link Roo.TabPanelItem} with the specified id/index
Hides the {link Roo.TabPanelItem} with the specified id/index
|
Roo.TabPanel | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Roo.util.Observable | ||
removeTab
(String/Number id)
Removes a {link Roo.TabPanelItem}.
Removes a {link Roo.TabPanelItem}.
|
Roo.TabPanel | |
setTabWidth
(Number The)
Resizes all the tabs to the passed width
Resizes all the tabs to the passed width
|
Roo.TabPanel | |
syncHeight
(Number targetHeight)
Updates the tab body element to fit the height of the container element
for overflow scrolling
Updates the tab body element to fit the height of the container element
for overflow scrolling
|
Roo.TabPanel | |
Roo.util.Observable | ||
unhideTab
(String/Number id)
"Unhides" the {link Roo.TabPanelItem} with the specified id/index.
"Unhides" the {link Roo.TabPanelItem} with the specified id/index.
|
Roo.TabPanel |
Event | Defined By | |
---|---|---|
Fires before the active tab changes, set cancel to true on the "e" parameter to cancel the change
Fires before the active tab changes, set cancel to true on the "e" parameter to cancel the change
|
Roo.TabPanel | |
tabchange (Roo.TabPanel this, Roo.TabPanelItem activePanel)
Fires when the active tab changes
Fires when the active tab changes
|
Roo.TabPanel |