PDA

View Full Version : [CLOSED] Tab hiding issue



mohan.bizbites
Oct 21, 2013, 8:56 AM
Hello team,
We have a tab panel with 2 tabs . by default tab2 is hidden. we want to load page in tab2 in a button click .Page loading is working fine but tab title not showing .
here the sample code to produce the problem .




Here is the sample code to reproduce the issue


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default1.aspx.cs" Inherits="Default1" %>


<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script runat="server">
protected void btnShowTab_Click(object sender, DirectEventArgs e)
{
Panel6.Hidden = false;
}


</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="rm" runat="server" />
<ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
<Items>
<ext:Panel ID="Panel1"
runat="server"
Title="North"
Region="North"
Split="true"
Height="150"
BodyPadding="6"
Html="North"
Collapsible="true" />
<ext:Panel ID="Panel2"
runat="server"
Title="West"
Region="West"
Layout="AccordionLayout"
Width="225"
MinWidth="225"
MaxWidth="400"
Split="true"
Collapsible="true">
<Items>
<ext:Panel ID="Panel3"
runat="server"
Title="Navigation"
Border="false"
BodyPadding="6"
Icon="FolderGo"
Html="West" />
<ext:Panel ID="Panel4"
runat="server"
Title="Settings"
Border="false"
BodyPadding="6"
Icon="FolderWrench"
Html="Some settings in here" />
</Items>
</ext:Panel>
<ext:TabPanel ID="TabPanel1" runat="server" Region="Center">
<Items>
<ext:Panel ID="Panel5" runat="server" Title="Tab1" Border="false" BodyPadding="6">
<Items>
<ext:Button ID="btnShowTab" runat="server" Text="Show Tab" >
<Listeners>
<Click Handler="#{Panel6}.show();"></Click>
</Listeners>
<%-- <DirectEvents>
<Click OnEvent="btnShowTab_Click" />
</DirectEvents>--%>
</ext:Button>
</Items>
</ext:Panel>


<ext:Panel ID="Panel6" runat="server" Hidden="true" Title="Tab2" HideMode="Offsets" Border="false" BodyPadding="6"
Html="New Tab" />
</Items>
</ext:TabPanel>
</Items>
</ext:Viewport>


</div>
</form>
</body>
</html>




Thanks in advance .

Daniil
Oct 21, 2013, 10:20 AM
Hi @mohan.bizbites,

A TabPanel doesn't support pre-hidden tabs. A "hidden" tab should be defined outside from a TabPanel. For example, in its Bin collection.

Please see Panel6 and ShowTab6 here:
http://examples2.ext.net/#/TabPanel/Basic/Show_Hide/