[CLOSED] TabPanel Header

  1. #1

    [CLOSED] TabPanel Header

    Hi,

    In our project we have a tabpanel with 4 tabs. Each tab could be hidden if the pertinent permission is assigned.
    How can we hide tabpanel header when only one of this tabs is visible thus allowing the tab panel take up less space in screen?

    Thanks in advance
    Last edited by Daniil; Dec 23, 2011 at 8:37 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Hope I correctly understand the requirement.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Container 
                ID="Container1" 
                runat="server" 
                Height="300" 
                Width="300" 
                Layout="CardLayout" 
                ActiveIndex="0">
                <Items>
                    <ext:TabPanel runat="server">
                        <Items>
                            <ext:Panel 
                                runat="server" 
                                Title="Tab 1" 
                                Html="Tab 1" 
                                Closable="true" 
                                BodyStyle="background-color: yellow;" />
                            <ext:Panel 
                                runat="server" 
                                Title="Tab 2" 
                                Html="Tab 2" 
                                Closable="true" 
                                BodyStyle="background-color: green;" />
                        </Items>
                        <Listeners>
                            <TabClose Handler="if (this.items.getCount() === 1) {
                                                   Container2.add(this.items.get(0));
                                                   Container1.layout.setActiveItem(1);
                                               }" 
                                      Delay="1" />
                        </Listeners>
                    </ext:TabPanel>
                    <ext:Container ID="Container2" runat="server" Layout="FitLayout" />
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
  3. #3
    Yes it's similar of the case explained. The only difference is that I apply the solution in render listener because tabs aren't closable, tabs are visible o invisible with a databind property.

    Thanks for all, and merry X-mas
  4. #4
    Merry X-mas to you:)

    Is the thread as closed?

Similar Threads

  1. Replies: 4
    Last Post: Jul 13, 2012, 7:47 PM
  2. Replies: 3
    Last Post: Sep 09, 2010, 6:31 AM
  3. [CLOSED] How to remove the TabPanel header bottom border?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 12, 2010, 3:09 PM
  4. Replies: 9
    Last Post: Apr 27, 2009, 3:19 PM
  5. Replies: 0
    Last Post: Apr 09, 2009, 5:12 PM

Tags for this Thread

Posting Permissions