Feb 13, 2017, 12:04 PM
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:
Please Help me out on this issue.
Thank you.
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.
Last edited by iansriley; Feb 16, 2017 at 2:49 PM.