TTabPanel displays a tabbed panel. Users can click on the tab bar to switching among
different tab views. Each tab view is an independent panel that can contain arbitrary content.
If the {@link setAutoSwitch AutoSwitch} property is enabled, the user will be able to switch the active view
to another one just hovering its corresponding tab caption.
A TTabPanel control consists of one or several {@link TTabView} controls representing the possible
tab views. At any time, only one tab view is visible (active), which is specified by any of
the following properties:
- {@link setActiveViewIndex ActiveViewIndex} - the zero-based integer index of the view in the view collection.
- {@link setActiveViewID ActiveViewID} - the text ID of the visible view.
- {@link setActiveView ActiveView} - the visible view instance.
If both {@link setActiveViewIndex ActiveViewIndex} and {@link setActiveViewID ActiveViewID}
are set, the latter takes precedence.
TTabPanel uses CSS to specify the appearance of the tab bar and panel. By default,
an embedded CSS file will be published which contains the default CSS for TTabPanel.
You may also use your own CSS file by specifying the {@link setCssUrl CssUrl} property.
The following properties specify the CSS classes used for elements in a TTabPanel:
- {@link setCssClass CssClass} - the CSS class name for the outer-most div element (defaults to 'tab-panel');
- {@link setTabCssClass TabCssClass} - the CSS class name for nonactive tab div elements (defaults to 'tab-normal');
- {@link setActiveTabCssClass ActiveTabCssClass} - the CSS class name for the active tab div element (defaults to 'tab-active');
- {@link setViewCssClass ViewCssClass} - the CSS class for the div element enclosing view content (defaults to 'tab-view');
To use TTabPanel, write a template like following:
loadPostData()
public method
This method is primarly used by framework developers.
raisePostDataChangedEvent()
public method
This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface.
It is invoked by the framework when {@link getActiveViewIndex ActiveViewIndex} property
is changed on postback.
This method is primarly used by framework developers.
renderContents()
public method
Renders body contents of the tab control.