[CLOSED] Nested BorderLayout

  1. #1

    [CLOSED] Nested BorderLayout

    Hello.
    I'm having troubles nesting border layouts.
    I have a simple scenario defined as such :
    Masterpage : ViewPort --> BorderLayout (Center) -->Panel --> ContentPlaceHolder
    Page : Only my user control for now
    UserControl : it's somehow working with Panel --> BorderLayout if I set the panel height to a fixed size, but I would rather have it set to 100%, so it doesnt really satisfy me.

    The obvious solution was to define in my user control ViewPort --> BorderLayout, but the new viewport parent is then the form, and it appears below the first borderlayout.
    I tried some stuff with a FirLayout, but I can't get it to work properly.

    How am I suppose to define nested borderlayout? Cause I think i'm just doing something the wrong way here :/

    Thx :)
  2. #2

    RE: [CLOSED] Nested BorderLayout

    Hi Rod,

    Please post a code sample demonstrating how to reproduce the Layout and the relationship of the MasterPage and Child.




    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Nested BorderLayout

    Simpler that what I'm doing but still show the pb.

    MasterPage
      <ext:ScriptManager ID="GeneralScriptManager" runat="server" QuickTips="true" WindowUnloadMsg="Toto"
            StateProvider="Cookie" Theme="Gray" />
        <ext:ViewPort ID="GeneralViewPort" runat="server">
            <Content>
                <ext:BorderLayout ID="PhotothequeBorderLayout" runat="server">
                    <West Collapsible="true" Split="true">
                        <ext:Panel ID="MenuPanel" runat="server" Title="Menu" Width="175">
                            <Content>
                                West
                            </Content>
                        </ext:Panel>
                    </West>
                    <Center>
                        <ext:Panel ID="ContentPanel" runat="server">
                            <Content>
                                <asp:ContentPlaceHolder runat="server" ID="GeneralContentPlaceHolder">
                                </asp:ContentPlaceHolder>
                            </Content>
                        </ext:Panel>
                    </Center>
                </ext:BorderLayout>
            </Content>
        </ext:ViewPort>
    Page
    <%@ Register src="WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="GeneralContentPlaceHolder" runat="server">
        <uc1:WebUserControl1 ID="WebUserControl11" runat="server" />
    </asp:Content>
    UserControl
    <ext:ViewPort ID="UcViewPort" runat="server">
        <Content>
            <ext:BorderLayout ID="PhotothequUcBorderLayout" runat="server">
                <North>
                    <ext:Panel ID="UcMenuPanel" runat="server" Title="Menu" Height="175">
                        <Content>
                            Header
                        </Content>
                    </ext:Panel>
                </North>
                <Center>
                    <ext:Panel ID="ContentPanel" runat="server" >
                        <Content>
                            labalblablablabalblablablabalblablablabalblablablabalblablablabalblablabla 
                        </Content>
                    </ext:Panel>
                </Center>
            </ext:BorderLayout>
        </Content>
    </ext:ViewPort>
    Actually I'm using a panel instead of a ViewPort in the ascx, with a fixed height, but that's not rly a solution.
  4. #4

    RE: [CLOSED] Nested BorderLayout

    Any clue here? Or do you need more precisions?
  5. #5

    RE: [CLOSED] Nested BorderLayout



    Hi Rod,

    I was able to get the nested layouts working properly, although I had to reconfigure the Panels slightly.

    MasterPage

    <%@ Master Language="C#" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" HideInDesign="true" />
            
            <ext:ViewPort ID="ViewPort1" runat="server">
                <Body>
                    <ext:BorderLayout ID="BorderLayout1" runat="server">
                        <West Collapsible="true" Split="true">
                            <ext:Panel ID="Panel1" runat="server" Title="Menu" Width="175">
                                <Body>
                                    West
                                </Body>
                            </ext:Panel>
                        </West>
                        <Center>
                            <ext:Panel ID="Panel2" runat="server" Border="false">
                                <Body>
                                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                                    
                                    </asp:ContentPlaceHolder>
                                </Body>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:ViewPort>
        </form>
    </body>
    </html>
    Page

    <%@ Page Language="C#" MasterPageFile="MasterPage1.Master" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    
    <%@ Register src="UserControl1.ascx" tagname="UserControl1" tagprefix="uc1" %>
    
    
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <ext:FitLayout ID="FitLayout1" runat="server">
            <ext:Panel ID="Panel1" runat="server" Border="false">
                <Body>
                    <uc1:UserControl1 ID="UserControl11" runat="server" />
                </Body>
            </ext:Panel>
        </ext:FitLayout>
    </asp:Content>
    UserControl

    <%@ Control Language="C#" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    
    <ext:BorderLayout ID="BorderLayout1" runat="server">
        <North Split="true">
            <ext:Panel ID="Panel1" runat="server" Title="Menu" Height="175">
                <Body>
                    Header
                </Body>
            </ext:Panel>
        </North>
        <Center>
            <ext:Panel ID="Panel2" runat="server" >
                <Body>
                    labalblablablabalblablablabalblablablabalblablablabalblablablabalblablabla 
                </Body>
            </ext:Panel>
        </Center>
    </ext:BorderLayout>
    The code above is using the latest v0.7 code base. I'm pretty sure the only change you would have to make to get this working with v0.6 is to change the <Body> tags to <Content> tags.

    For more information re: the new <Body> tag, see http://forums.ext.net/showthread.php...2938-12-1.aspx

    Hope this helps.
    Geoffrey McGill
    Founder
  6. #6

    RE: [CLOSED] Nested BorderLayout

    Working like a charm, ty :)

Similar Threads

  1. [CLOSED] Nested data in nested grids
    By FAS in forum 1.x Legacy Premium Help
    Replies: 16
    Last Post: Apr 19, 2012, 7:51 PM
  2. Replies: 0
    Last Post: Apr 19, 2012, 3:52 PM
  3. [CLOSED] Nested BorderLayout??
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 24, 2011, 4:57 PM
  4. Replies: 1
    Last Post: Jun 08, 2010, 12:51 AM
  5. BorderLayout on BorderLayout do not render
    By nanosassa in forum 1.x Help
    Replies: 1
    Last Post: Apr 22, 2009, 4:05 PM

Posting Permissions