[CLOSED] [1.0] BorderLayout inside GroupTab inside TabPanel not showing up

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [1.0] BorderLayout inside GroupTab inside TabPanel not showing up

    Hi,

    I'm struggling with the following scenario:

    In side a border layout for the page,

    • I have a tab panel,
      • Inside one of the tabs I have a group tab.
        • The contents for one of the group tab needs to be a border layout.



    1) Everything renders okay apart from the Border layout, which does not show up (though inspecting with Firebug it is there)
    2) I can't seem to get the GroupTab to fit the contents of the tab panel that it is inside

    I think issue 2) might be related to issue 1) because the Border Layout seems to be there when you inspect in Firebug, but the initial height seems to be too small. So perhaps solving the second issue will solve the first?

    I've tried lots of combinations, but I am sure I have missed something really simple and obvious!

    Here is what I have so far:

    <%@ 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 id="Head1" runat="server">
        <title>GroupTabPanel - Ext.NET Examples</title>
     
        <style type="text/css">
            .vertical-tabs.x-grouptabs-panel {
                background: transparent;
                border:none;
            }
     
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-panel-body {
                border-color:#ccc;
            }
            
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-corner {
                background-image:none;
            }
            
            .vertical-tabs .x-grouptabs-expand {
                display:none;
            }
            
            .vertical-tabs.x-tab-panel-left ul.x-grouptabs-strip li.x-grouptabs-strip-active,
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:5px 0 0 5px;
                border-radius:5px 0 0 5px;
                border-color:#ccc;
            }
     
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:0 5px 5px 0;
                border-radius:0 5px 5px 0;
            }
            
            .vertical-tabs.x-grouptabs-panel .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                font-size:11px;
                padding:0 2px; /* if you don't expect to use icons for the tabs */
                color:#555;
            }
     
            .vertical-tabs.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                text-align:left;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        
        <ext:Viewport ID="Viewport1" runat="server" Layout="Fit">
            <Items>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North Split="true">
                        <ext:Panel ID="HeaderPanel" Height="50" Html="Header" runat="server" />
                    </North>
                    <West Collapsible="true" Split="true">
                        <ext:Panel ID="WestPanel" Height="50" Width="200" Html="West" runat="server" />
                    </West>
                    <Center>
                        <ext:TabPanel ID="TabPanel2" runat="server" Plain="true" Title="TabPanel1 title" Padding="3">
                            <Items>
                                <ext:Panel ID="Panel1" runat="server" Title="Tab 1">
                                    <Content>
                                        <p>Group Tab 1 contents</p>
                                    </Content>
                                </ext:Panel>
                                <ext:Panel ID="Panel3" runat="server" Title="Has Group Tabs inside">
                                    <Items>
                                        <ext:Panel ID="Panel8" Layout="fit" runat="server" Border="false">
                                            <Items>
                                                <ext:GroupTabPanel ID="GroupTabPanel1" Cls="vertical-tabs" runat="server" TabWidth="130" ActiveGroupIndex="0" Padding="3" Margins="0">
                                                    <Groups>
                                                        <ext:GroupTab ID="GroupTab1" runat="server" MainItem="0" Expanded="False" Frame="True" HeaderAsText="True" HideBorders="False">
                                                            <Items>
                                                                <ext:Panel ID="TabPanelContainer" runat="server" Title="Tab Panel 1" Padding="2">
                                                                    <Content>
                                                                        <p>Sample content</p>
                                                                    </Content>
                                                                </ext:Panel>
                                                            </Items>
                                                        </ext:GroupTab>
                                                        <ext:GroupTab ID="GroupTab3" runat="server">
                                                            <Items>
                                                                <ext:Panel ID="Panel6" runat="server" Title="Group Tab 4" Html="Group Tab Panel contents 4" />
                                                            </Items>
                                                        </ext:GroupTab>
                                                        <ext:GroupTab ID="GroupTab4" runat="server">
                                                            <Items>
                                                                <ext:Panel ID="Panel7" runat="server" Title="Has border layout">
                                                                    <Items>
                                                                        <ext:BorderLayout ID="BorderLayoutNested" runat="server">
                                                                            <Center MinHeight="70">
                                                                                <ext:Panel
                                                                                    ID="CenterPanelContent"
                                                                                    runat="server"
                                                                                    Height="70"
                                                                                    AutoScroll="true">
                                                                                    <Content>
                                                                                        <p>Content for center panel</p>
                                                                                    </Content>
                                                                                </ext:Panel>
                                                                            </Center>
                                                                            <South Split="true" Floatable="false">
                                                                                <ext:Panel
                                                                                    AutoScroll="true"
                                                                                    CollapseFirst="false"
                                                                                    Collapsible="true"
                                                                                    Height="313"
                                                                                    Icon="Table"
                                                                                    ID="SouthPanelContent"
                                                                                    runat="server"
                                                                                    Title="Buckets"
                                                                                    TitleCollapse="true" />
                                                                            </South>
                                                                        </ext:BorderLayout>
                                                                    </Items>
                                                                </ext:Panel>
                                                            </Items>
                                                        </ext:GroupTab>
                                                    </Groups>
                                                </ext:GroupTabPanel>
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:TabPanel>
                    </Center>
                </ext:BorderLayout>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    Also, here is a slight variation that works quite nicely, but the group tab and tab panel are swapped: the tab panel is inside the group tab!

    <%@ 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 id="Head1" runat="server">
        <title>GroupTabPanel - Ext.NET Examples</title>
     
        <style type="text/css">
            .vertical-tabs.x-grouptabs-panel {
                background: transparent;
                border:none;
            }
     
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-panel-body {
                border-color:#ccc;
            }
            
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-corner {
                background-image:none;
            }
            
            .vertical-tabs .x-grouptabs-expand {
                display:none;
            }
            
            .vertical-tabs.x-tab-panel-left ul.x-grouptabs-strip li.x-grouptabs-strip-active,
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:5px 0 0 5px;
                border-radius:5px 0 0 5px;
                border-color:#ccc;
            }
     
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:0 5px 5px 0;
                border-radius:0 5px 5px 0;
            }
            
            .vertical-tabs.x-grouptabs-panel .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                font-size:11px;
                padding:0 2px; /* if you don't expect to use icons for the tabs */
                color:#555;
            }
     
            .vertical-tabs.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                text-align:left;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        
        <ext:Viewport ID="Viewport1" runat="server" Layout="Fit">
            <Items>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North Split="true">
                        <ext:Panel ID="HeaderPanel" Height="50" Html="Header" runat="server" />
                    </North>
                    <West Collapsible="true" Split="true">
                        <ext:Panel ID="WestPanel" Height="50" Width="200" Html="West" runat="server" />
                    </West>
                    <Center>
                        <ext:GroupTabPanel ID="GroupTabPanel1" Cls="vertical-tabs" runat="server" TabWidth="130" ActiveGroupIndex="0" Padding="3" Margins="0">
                            <Groups>
                                <ext:GroupTab ID="GroupTab1" runat="server" MainItem="0" Expanded="False" Frame="True" HeaderAsText="True" HideBorders="False">
                                    <Items>
                                        <ext:Panel ID="TabPanelContainer" Layout="fit" runat="server" Title="Tab Panel and too <br />much text" Padding="2">
                                            <Items>
                                                <ext:TabPanel ID="TabPanel2" runat="server" Plain="true" Title="TabPanel1 title" Padding="3">
                                                    <Items>
                                                        <ext:Panel ID="Panel1" runat="server" Title="Tab 1">
                                                            <Content>
                                                                <p>Note limitations:</p>
                                                                <p>1) Vertical tab width limit is set in pixels so title may overflow and be hidden</p>
                                                                <p>2) The TabPanel here is inside a Panel so the Panel can be given some padding</p>
                                                            </Content>
                                                        </ext:Panel>
                                                        <ext:Panel ID="Panel2" runat="server" Title="Tab 2">
                                                            <Content>
                                                                <p>Tab 2 contents</p>
                                                            </Content>
                                                        </ext:Panel>
                                                        <ext:Panel ID="Panel3" runat="server" Title="Tab 3">
                                                            <Content>
                                                                <p>Tab 3 contents</p>
                                                            </Content>
                                                        </ext:Panel>
                                                    </Items>
                                                </ext:TabPanel>
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:GroupTab>
                                <ext:GroupTab ID="Group2" runat="server">
                                    <Items>
                                        <ext:Panel ID="Panel5" 
                                            runat="server" 
                                            Title="Group Tab 2" 
                                            TabTip="Group tab 2 tabtip" 
                                            Html="Group Tab Panel contents 2" />
                                    </Items>
                                </ext:GroupTab>
                                <ext:GroupTab ID="GroupTab2" runat="server">
                                    <Items>
                                        <ext:Panel ID="Panel4" 
                                            runat="server" 
                                            Title="Group Tab 3" 
                                            TabTip="Group tab 3 tabtip" 
                                            Html="Group Tab Panel contents 3" />
                                    </Items>
                                </ext:GroupTab>
                                <ext:GroupTab ID="GroupTab3" runat="server">
                                    <Items>
                                        <ext:Panel ID="Panel6" 
                                            runat="server" 
                                            Title="Group Tab 4" 
                                            TabTip="Group tab 4 tabtip" 
                                            Html="Group Tab Panel contents 4" />
                                    </Items>
                                </ext:GroupTab>
                                <ext:GroupTab ID="GroupTab4" runat="server">
                                    <Items>
                                        <ext:Panel ID="Panel7" Layout="fit" runat="server" Title="Group tab 5">
                                            <Items>
                                                <ext:BorderLayout ID="BorderLayoutNested" runat="server">
                                                    <Center MinHeight="70">
                                                        <ext:Panel
                                                            ID="CenterPanelContent"
                                                            runat="server"
                                                            Height="70"
                                                            AutoScroll="true">
                                                            <Content>
                                                                <p>Content for center panel</p>
                                                            </Content>
                                                        </ext:Panel>
                                                    </Center>
                                                    <South Split="true" Floatable="false">
                                                        <ext:Panel
                                                            AutoScroll="true"
                                                            CollapseFirst="false"
                                                            Collapsible="true"
                                                            Height="313"
                                                            Icon="Table"
                                                            ID="SouthPanelContent"
                                                            runat="server"
                                                            Title="Buckets"
                                                            TitleCollapse="true" />
                                                    </South>
                                                </ext:BorderLayout>
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:GroupTab>
                            </Groups>
                        </ext:GroupTabPanel>
                    </Center>
                    <South Split="true">
                        <ext:Panel ID="FooterPanel" Height="50" Html="Footer" runat="server" />
                    </South>
                </ext:BorderLayout>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Sep 22, 2010 at 9:28 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Remove Layout="Fit" from the Viewport. The way you have the Viewport configured is you are trying to set two Layouts, BorderLayout and Fit Layout. Only one is required.
    Geoffrey McGill
    Founder
  3. #3
    Thanks Geoffrey,

    Not sure how "fit" got into the ViewPort as my real code that I used as a basis to simplify and create the sample doesn't have that. Anyway, unfortunately it didn't help. I still have the same layout problem.
  4. #4
    Hi Anup,

    I tested with your last code sample and everything appears to be rendering correctly.

    Can you provide more information regarding what is rendering incorrectly? maybe a screen capture with notes pointing to the rendering issues?

    Are you using the latest build from SVN?
    Geoffrey McGill
    Founder
  5. #5
    Quote Originally Posted by geoffrey.mcgill View Post
    I tested with your last code sample and everything appears to be rendering correctly.
    Hi,

    It was the first sample that wasn't working. I mentioned the last sample works nicely and provided it just as a reference in case that was of help. Sorry for confusion :)

    I've just updated from SVN and the first sample still has the 2 problems.

    I've attached a screenshot. Hope that helps.

    Anup
    Attached Thumbnails Click image for larger version. 

Name:	BorderLayoutInsideGroupTabInsideTab.png 
Views:	221 
Size:	23.8 KB 
ID:	1639  
  6. #6
    Hi,

    Please set Layout="fit" on Panel3, and remove Layout="fit" on Viewport1.

    Hope this helps.
    Geoffrey McGill
    Founder
  7. #7
    Not that this was related to the problem, but I noticed some unnecessary nesting of Components. Here's a modified sample with some clean-up.

    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 id="Head1" runat="server">
        <title>GroupTabPanel - Ext.NET Examples</title>
      
        <style type="text/css">
            .vertical-tabs.x-grouptabs-panel {
                background: transparent;
                border:none;
            }
      
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-panel-body {
                border-color:#ccc;
            }
             
            .vertical-tabs.x-grouptabs-panel .x-grouptabs-corner {
                background-image:none;
            }
             
            .vertical-tabs .x-grouptabs-expand {
                display:none;
            }
             
            .vertical-tabs.x-tab-panel-left ul.x-grouptabs-strip li.x-grouptabs-strip-active,
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:5px 0 0 5px;
                border-radius:5px 0 0 5px;
                border-color:#ccc;
            }
      
            .vertical-tabs.x-tab-panel-right ul.x-grouptabs-strip li.x-grouptabs-strip-active {
                -moz-border-radius:0 5px 5px 0;
                border-radius:0 5px 5px 0;
            }
             
            .vertical-tabs.x-grouptabs-panel .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                font-size:11px;
                padding:0 2px; /* if you don't expect to use icons for the tabs */
                color:#555;
            }
      
            .vertical-tabs.x-tab-panel-right .x-tab-panel-header ul.x-grouptabs-strip a.x-grouptabs-text {
                text-align:left;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
         
        <ext:Viewport runat="server" Layout="border">
            <Items>
                <ext:Panel runat="server" Region="North" Split="true" Height="50" Html="Header" />
                <ext:Panel runat="server" Region="West" Split="true" Height="50" Width="200" Html="West" />
                <ext:TabPanel runat="server" Region="Center" Plain="true" Title="TabPanel1 title" Padding="3">
                    <Items>
                        <ext:Panel runat="server" Title="Tab 1">
                            <Content>
                                <p>Group Tab 1 contents</p>
                            </Content>
                        </ext:Panel>
                        <ext:Panel runat="server" Title="Has Group Tabs inside" Layout="fit">
                            <Items>
                                <ext:Panel Layout="fit" runat="server" Border="false">
                                    <Items>
                                        <ext:GroupTabPanel 
                                            runat="server" 
                                            Cls="vertical-tabs" 
                                            TabWidth="130" 
                                            ActiveGroupIndex="0" 
                                            Padding="3" 
                                            Margins="0">
                                            <Groups>
                                                <ext:GroupTab 
                                                    runat="server" 
                                                    MainItem="0" 
                                                    Expanded="False" 
                                                    Frame="True" 
                                                    HeaderAsText="True" 
                                                    HideBorders="False">
                                                    <Items>
                                                        <ext:Panel runat="server" Title="Tab Panel 1" Padding="2">
                                                            <Content>
                                                                <p>Sample content</p>
                                                            </Content>
                                                        </ext:Panel>
                                                    </Items>
                                                </ext:GroupTab>
                                                <ext:GroupTab runat="server">
                                                    <Items>
                                                        <ext:Panel 
                                                            runat="server" 
                                                            Title="Group Tab 4" 
                                                            Html="Group Tab Panel contents 4" 
                                                            />
                                                    </Items>
                                                </ext:GroupTab>
                                                <ext:GroupTab runat="server">
                                                    <Items>
                                                        <ext:Panel 
                                                            runat="server" 
                                                            Title="Has border layout" 
                                                            Layout="border">
                                                            <Items>
                                                                <ext:Panel
                                                                    ID="CenterPanelContent"
                                                                    runat="server"
                                                                    Region="Center"
                                                                    Height="70"
                                                                    AutoScroll="true"
                                                                    MinHeight="70">
                                                                    <Content>
                                                                        <p>Content for center panel</p>
                                                                    </Content>
                                                                </ext:Panel>
                                                                <ext:Panel
                                                                    ID="SouthPanelContent"
                                                                    runat="server"
                                                                    Region="South"
                                                                    Split="true"
                                                                    AutoScroll="true"
                                                                    CollapseFirst="false"
                                                                    Collapsible="true"
                                                                    Height="313"
                                                                    Icon="Table"
                                                                    Title="Buckets"
                                                                    TitleCollapse="true" 
                                                                    />
                                                            </Items>
                                                        </ext:Panel>
                                                    </Items>
                                                </ext:GroupTab>
                                            </Groups>
                                        </ext:GroupTabPanel>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:TabPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    Geoffrey McGill
    Founder
  8. #8
    Geoffrey,

    Many thanks for that... Adding layout = "fit" on panel 3 did the trick -- I think I had tried fit on that and then taking it off on the inner one, but not keeping it on both :) Knew it would be simple (for you!)

    Also, thanks for taking the time to provide a simplified example. That is really appreciated.

    You can mark this as solved.
  9. #9
    By the way, one reason I had an explicit BorderLayout inside a Panel (where the Panel was inside the GroupTab) was that I could not put a BorderLayout directly under the GroupTab. Yet, when you simplified it, it worked...!

    The other reason I wanted a BorderLayout was so on the south region I can set floatable = false. There's no floatable property on Panel itself, and looking at the ExtJs docs, it seems it is only on the Region itself.

    I tried setting it client side using a render listener like this, using the simplified example you provided earlier:

    <ext:GroupTab runat="server">
        <Items>
            <ext:Panel ID="Panel8"
                runat="server"
                Title="Has border layout"
                Layout="border">
                <Items>
                    <ext:Panel
                        ID="CenterPanelContent"
                        runat="server"
                        Region="Center"
                        Height="70"
                        AutoScroll="true"
                        MinHeight="70">
                        <Content>
                            <p>Content for center panel</p>
                        </Content>
                    </ext:Panel>
                    <ext:Panel
                        ID="SouthPanelContent"
                        runat="server"
                        Region="South"
                        Split="true"
                        AutoScroll="true"
                        CollapseFirst="false"
                        Collapsible="true"
                        Height="313"
                        Icon="Table"
                        Title="Buckets"
                        TitleCollapse="true"
                        >
                        <Listeners>
                            <Render Handler="this.floatable = false;" />
                        </Listeners>
                    </ext:Panel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:GroupTab>
    I also tried BeforeRender, just in case, but that too didn't work. I think it is because "this" is a Panel, not a region, so it seems to have no effect... Any thoughts?
  10. #10
    Quote Originally Posted by anup View Post
    Any thoughts?
    Just set Floatable="false" on the "SouthPanelContent" Panel. It will serialize properly.

    Or, add as a <CustomConfig> item.
    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: May 18, 2011, 7:06 PM
  2. Replies: 7
    Last Post: Feb 01, 2011, 11:00 AM
  3. Replies: 9
    Last Post: Oct 07, 2010, 6:27 PM
  4. Replies: 1
    Last Post: Jun 08, 2010, 12:51 AM
  5. [CLOSED] JavaScript error with MultiSelect inside BorderLayout and TabPanel
    By martin.mosimann in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 25, 2009, 1:03 PM

Posting Permissions