Weird Behaviour of <Content> of <ext:Panel>

  1. #1

    Weird Behaviour of <Content> of <ext:Panel>

    Hi everyone, once again xD

    I have a BorderLayout which its center panel has another panel with a "fit" layout.
    In the <Content> tag of this last panel, I have 2 <ext:Panel>. The problem is that when I run the project, I can see only one of this 2 panels! (the one which is firstly declared). But the weird is that if I put a "label" before them and I run the project, I can see both! (and the label too).

    I can put an invisible "label", and my problem might be solved, but.. why this happen? why I can't just put the two panels and see them both when I run the project?

    I CAN'T SEE BOTH PANELS:
    // ... this is the center panel of a BorderLayout
     <Center Split="true">
                    <ext:Panel ID="pCentral" runat="server" Title="Central Data" Layout="Fit">
                        <Content>
                            <ext:Panel ID="p1" runat="server" Border="false">
                             // the content of panel 1.. 
                            </ext>
                            <ext:Panel ID="p2" runat="server" Border="false">
                             // the content of panel 2...
                            </ext>
                        </Content>
                     </ext:Panel>
    </Center>
    I CAN SEE BOTH PANELS!!
    // ... this is the center panel of a BorderLayout
     <Center Split="true">
                    <ext:Panel ID="pCentral" runat="server" Title="Central Data" Layout="Fit">
                        <Content>
                             <ext:Label ID="lbl" runat="server" Text="Hello, I'm the magic label who allows seeing both panels">
                            </ext:Label>
                            <ext:Panel ID="p1" runat="server" Border="false">
                             // the content of panel 1.. 
                            </ext>
                            <ext:Panel ID="p2" runat="server" Border="false">
                             // the content of panel 2...
                            </ext>
                        </Content>
                     </ext:Panel>
    </Center>
    It would be great if someone could explain me how this works... or why it happens.

    Thanks again!,

    Christian.
  2. #2
    The 'fit' layout only accepts one item as a child.

    http://dev.sencha.com/deploy/dev/doc...yout.FitLayout

    I'm not 100% what layout you require, but if you remove the Layout="fit" property and change the <Content> regions to <Items> it should start working better.
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    The 'fit' layout only accepts one item as a child.

    http://dev.sencha.com/deploy/dev/doc...yout.FitLayout

    I'm not 100% what layout you require, but if you remove the Layout="fit" property and change the <Content> regions to <Items> it should start working better.
    Thanks Geoffrey!

    Regards,

    Christian.

Similar Threads

  1. Replies: 5
    Last Post: Oct 16, 2012, 9:53 AM
  2. Cache panel content
    By Tallmaris in forum 1.x Help
    Replies: 6
    Last Post: Aug 15, 2011, 1:40 PM
  3. Refresh ext:Panel content
    By reiben in forum 1.x Help
    Replies: 3
    Last Post: Mar 29, 2011, 5:01 PM
  4. Tab Panel Content Loading
    By xMAC in forum 1.x Help
    Replies: 5
    Last Post: Dec 10, 2010, 7:07 AM
  5. Panel Content Location
    By fpw2377 in forum 1.x Help
    Replies: 2
    Last Post: Aug 05, 2010, 8:08 PM

Tags for this Thread

Posting Permissions