Tabpanel order gets changed while adding Tabbar button inserted at 0th position

  1. #1

    Tabpanel order gets changed while adding Tabbar button inserted at 0th position

    Hi,
    I have a TabPanel which has some tabs (panels), First I want to display a button on the TabBar and then the remaining tabs. So I have added a button in TabBar, and then in the TabPanel Listeners I have added the below code.

    Default.aspx:
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>TabBar Config - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
        <style>
            .x-newtab-item {
                float: left;
                margin: 10px;
                width: 200px;
                height: 200px;
                border: 2px solid #E0E0E0;
                cursor: pointer;
                text-align: center;
            }
            .x-newtab-over-item {
                border: 2px solid gray;
            }
            .x-newtab-item h1 {
                font-size: 160px;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Window
                runat="server"
                Title="TabBar Config"
                Width="680"
                Resizable="false"
                Closable="false"
                Height="500"
                Icon="Link"
                Layout="FitLayout">
                <Items>
                    <ext:TabPanel ID="TabPanel1" runat="server">
                        <Listeners>
                            <Add Handler="this.tabBar.insert(0, this .tabBar.child('#Button1'));" />
                        </Listeners>
                        <TabBar>
                            <ext:Button runat="server" Flat="true" Icon="Add" ID="Button1">
                            </ext:Button>
                        </TabBar>
                        <Items>
                            <ext:Panel ID="Panel1" runat="server" Title="Tab1">
                                <Content>
                                    <span>First Tab</span>
                                </Content>
                            </ext:Panel>
                            <ext:Panel ID="Panel2" runat="server" Title="Tab2">
                                <Content>
                                    <span>Second Tab</span>
                                </Content>
                            </ext:Panel>
                            <ext:Panel ID="Panel3" runat="server" Title="Tab3">
                                <Content>
                                    <span>Third Tab</span>
                                </Content>
                            </ext:Panel>
                        </Items>
                    </ext:TabPanel>
                </Items>
            </ext:Window>
        </form>
    </body>
    </html>
    After adding the Button1 at 0th position, then My tab order getting changed as shown in the attached screenshot.
    Please Help me out on this issue.

    Thank you.
    Click image for larger version. 

Name:	TabIssue.png 
Views:	38 
Size:	10.5 KB 
ID:	24861
    Last edited by iansriley; Feb 16, 2017 at 2:49 PM.

Similar Threads

  1. Replies: 0
    Last Post: Sep 17, 2014, 8:05 PM
  2. [CLOSED] TabBar in the TabPanel
    By leonardm in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 30, 2013, 4:56 AM
  3. [CLOSED] Tabpanel tabbar
    By infonext in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Mar 19, 2013, 4:47 AM
  4. Replies: 7
    Last Post: Oct 06, 2010, 6:44 PM
  5. [CLOSED] Something changed in 0.7 using TabPanel dynamically?
    By iwen in forum 1.x Legacy Premium Help
    Replies: 0
    Last Post: Nov 23, 2008, 8:26 AM

Posting Permissions