Class TabControl

The TabControl provides a simple client control tab interface to display multiple pages with a tabbed interface at the top. Content pages are simply created as plain

tags with an ID that is referenced via the TabPageClientId property. A default tab can be chosen which is displayed initially and the control keeps track of the tabpage active across apostbacks.

<>

The tab control only fires on the client and there are no server side events fired. You can assign the SelectedTab property but otherwise the server side has no additional control. Client side code can activate the tab with a JavaScript ActivateTab(tabId, num) which specifies the ClientID of the tab control and the tab by number or client ID of the Div.

System.Object
  System.Web.UI.Control
    Westwind.Web.Controls.TabControl
public class TabControl : Control, IPostBackDataHandler

Class Members

MemberDescription

Constructor

_TabHeight

AddTab

Adds a new item to the Tab collection.

public void AddTab(string Caption,     string Link,     string TabPageClientId)

public void AddTab(string Caption,     string Link)

public void AddTab(TabPage Tab)

LoadPostData

public sealed bool LoadPostData(string postDataKey,     NameValueCollection postCollection)

RaisePostDataChangedEvent

public sealed void RaisePostDataChangedEvent()

DisabledTabCssClass

SelectedTab

The Selected Tab. Set this to the TabPageClientId of the tab that you want to have selected

SelectedTabCssClass

The CSS class that is used to render a selected button. Defaults to selectedtabbutton.

TabCssClass

The CSS class that is used to render nonselected tabs.

TabHeight

The height of each of the tabs.

TabPages

Collection of Tabpages.

TabsPerRow

TabStripSeparatorCssClass

The class used for the separator strip between tab and content

TabstripSeparatorHeight

TabWidth

The width for each of the tabs. Each tab will be this width.

Example

<<code lang="HTML">>
<div class="containercontent">

    <ww:TabControl runat="server" ID="TabControls"
TabHeight="25" TabWidth="120"
        TabstripSeparatorHeight="" >
        <TabPages>
            <ww:TabPage runat="server" ID="Page1"
TabPageClientId="Page1" Caption="Page 1"

Style="height:25px;width:120px;height:25px;width:120px;" />
            <ww:TabPage runat="server" ID="Page2"
TabPageClientId="Page2" Caption="Page 2"

Style="height:25px;width:120px;height:25px;width:120px;" />
            <ww:TabPage runat="server" ID="Page3"
TabPageClientId="Page3" Caption="Page 3"

Style="height:25px;width:120px;height:25px;width:120px;"/>

        </TabPages>
    </ww:TabControl>

    <div id="Page1" class="tabpage">
        Page 1
    </div>
    <div id="Page2" class="tabpage">
        Page 2
    </div>
    <div id="Page3" class="tabpage">
        Page 3
    </div>
</div>
<</code>>

Requirements

Namespace: Westwind.Web.Controls
Assembly: westwind.web.webforms.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic