[CLOSED] Vbox and hbox layout not resizing to fill screen

  1. #1

    [CLOSED] Vbox and hbox layout not resizing to fill screen

    Trying to use a combination of vbox and hbox layout to effectively have a "table" layout that resizes to the extents of the browser window. The end component will be in a control so I have coded the example that way. The result sizes to the width of the browser initially but then does not stretch/resize horizontally or vertically and nothing seems to stretch vertically.

    Container page:
    <%@ Page Language="vb" %>
    <%@ Register TagName="uc" TagPrefix="alloc" Src="TestLayoutControl.ascx" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext2:ResourceManager ID="ResourceManager" runat="server" />
    
        <form id="form1" runat="server">
        <div>
    
            <ext2:Panel Flex="1" runat="server" Title="Define Allocation" Layout="vboxlayout" >
                <LayoutConfig>
                    <ext2:VBoxLayoutConfig Pack="Center" Align="Stretch"></ext2:VBoxLayoutConfig>
                </LayoutConfig>
                <Content>
                    <alloc:uc runat="server" ID="controlAllocations" />
                </Content>
            </ext2:Panel>   
             
        </div>
        </form>
    </body>
    </html>
    Control page:

    <%@ Control Language="vb" %>
    
    <ext2:Panel runat="server" Layout="VBoxLayout">
            <LayoutConfig>
                <ext2:VBoxLayoutConfig Align="Stretch" />
            </LayoutConfig>
            <Items>
            <ext2:Panel Flex="1" runat="server" Layout="HBoxLayout">
                <LayoutConfig>
                    <ext2:HBoxLayoutConfig Align="Stretch"></ext2:HBoxLayoutConfig>
                </LayoutConfig>
                <Items>
                    <ext2:Panel  Flex="1" runat="server" ID="pnlAllocationChart" Title="Allocation Chart" ></ext2:Panel>
                    <ext2:Panel  Flex="1" runat="server" ID="pnlDetails" Title="Allocation Details"></ext2:Panel>
                </Items>
            </ext2:Panel>
            <ext2:Panel Flex="1" runat="server" ID="pnlAllocationGrid" Title="Allocation Grid">
                <Items>
                    <ext2:GridPanel runat="server" ID="grdAllocations">
                        <Store>
                            <ext2:Store runat="server" ID="StoreAllocations">
                                <Fields>
                                    <ext2:ModelField Name="ID"></ext2:ModelField>
                                    <ext2:ModelField Name="Description"></ext2:ModelField>
                                </Fields>
                            </ext2:Store>
                        </Store>
                        <ColumnModel>
                            <Columns>
                                <ext2:Column runat="server" ID="colID" DataIndex="ID"></ext2:Column>
                                <ext2:Column runat="server" ID="colDescription" DataIndex="Description"></ext2:Column>
                            </Columns>
                        </ColumnModel>
                    </ext2:GridPanel>
                </Items>
            </ext2:Panel>
        </Items>
    </ext2:Panel>
    Last edited by Daniil; Nov 28, 2014 at 2:07 PM. Reason: [CLOSED]
  2. #2
    Hi @rmelancon,

    I think you should use a Viewport as a top level container inside <form>. It automatically sizes itself to take all viewable space.

Similar Threads

  1. [CLOSED] Layout VBox in complicated collapsed?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 24, 2012, 12:54 AM
  2. vbox layout is not working on image button
    By robertgan in forum 1.x Help
    Replies: 1
    Last Post: Feb 27, 2012, 9:17 AM
  3. [CLOSED] vbox layout inside column layout
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 04, 2011, 2:44 PM
  4. HBox Layout in IE7, bug?
    By David Pelaez in forum 1.x Help
    Replies: 3
    Last Post: Jan 24, 2011, 1:18 PM
  5. [CLOSED] [1.0] Issue with VBox Layout in Latest SVN
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 07, 2010, 5:07 PM

Posting Permissions