[CLOSED] Column layouts in a Form layout, AutoHeight does nothing, why must I set the height? + MonitorResize?

  1. #1

    [CLOSED] Column layouts in a Form layout, AutoHeight does nothing, why must I set the height? + MonitorResize?

    Hi,

    Ext.NET RC 1.0
    .NET V3.5
    Vista

    Couple of things I want to understand and get a solution to, so I thought I'd ask the experts as I'm kinda stumped.
    We're trying to use form layouts for most of out detail forms and I want to understand why the following doesn't work.

    We currently have a layout similar to this.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ext_forum_post.aspx.cs" Inherits="OSyS.Kms._Ext._temp_.ext_forum_post" %>
    
    <%@ 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></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Panel ID="Panel1" Border="false" runat="server" Layout="fit" Height="600">
            <Items>
                <ext:Panel ID="panelPHADetails" runat="server" Frame="false" Border="false">
                    <Items>
                        <ext:Panel ID="Panel2" runat="server" Border="false" LabelWidth="125" Layout="Form">
                            <Items>
                                <ext:Label ID="lblPHANumber" runat="server" FieldLabel="Number" Text="New" AnchorHorizontal="50%" />
                                <ext:Container ID="Container1" runat="server" Layout="Column" AutoHeight="true">
                                    <Items>
                                        <ext:Container ID="Container12" runat="server" LabelAlign="Left" Layout="Form" LabelWidth="125" ColumnWidth=".5">
                                            <Items>
                                                <ext:TextField ID="TextboxPHAName" runat="server" FieldLabel="Name" MaxLength="60" AllowBlank="false" AnchorHorizontal="95%" />
                                                <ext:Label ID="LblRevalidation" runat="server" Visible="false" />
                                                <ext:TextField ID="TextRevalidation" runat="server" Visible="false" Width="90px" />
                                            </Items>
                                        </ext:Container>
                                        <ext:Container ID="Container13" runat="server" LabelAlign="Left" LabelWidth="125" Layout="Form" ColumnWidth=".5">
                                            <Items>
                                                <ext:TextField ID="TextboxPHAPrefix" runat="server" FieldLabel="Prefix" Width="60" MaxLength="8" AnchorHorizontal="50%" />
                                            </Items>
                                        </ext:Container>
                                    </Items>
                                </ext:Container>
                                <ext:Container ID="Container2" runat="server" Layout="Column" AutoHeight="true">
                                    <Items>
                                        <ext:Container ID="Container21" runat="server" LabelAlign="Left" LabelWidth="125" Layout="Form" ColumnWidth=".8">
                                            <Items>
                                                <ext:TextArea ID="TextboxScope" runat="server" FieldLabel="Scope" MaxLength="32766" AnchorHorizontal="100%" />
                                            </Items>
                                        </ext:Container>
                                        <ext:Container ID="Container22" runat="server" LabelAlign="Left" LabelWidth="125" Layout="Form" ColumnWidth=".2">
                                            <Items>
                                                <ext:Button runat="server" Text="Spell Check"></ext:Button>
                                            </Items>
                                        </ext:Container>
                                    </Items>
                                </ext:Container>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:Panel>
        </form>
    </body>
    </html>
    1) I want a 2 column form with some other stuff in it, if I don't set a HEIGHT on Container1 and try to use AutoHeight, Container2 just overlaps it.
    I don't really want to have to set heights on all the different sections (containers) of the form, just lay them out and have Ext sort the height out. I thought that's what AutoHeight was supposed to do, but it doesn't seem to work.

    2) I want the form to size the controls when the browser screen size changes, I've tried putting MonitorResize everywhere and it has no effect. How can I make that work?

    Any help is greatly appreciated.
    Last edited by Daniil; Mar 07, 2011 at 9:21 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by sadaf View Post
    1) I want a 2 column form with some other stuff in it, if I don't set a HEIGHT on Container1 and try to use AutoHeight, Container2 just overlaps it.
    I don't really want to have to set heights on all the different sections (containers) of the form, just lay them out and have Ext sort the height out. I thought that's what AutoHeight was supposed to do, but it doesn't seem to work.
    Hi,

    To get AutoHeight="true" working when it deals with ColumnLayout, please set up the following LayoutConfig section:

    Example
    <ext:Container runat="server" Layout="Column" AutoHeight="true">
        <LayoutConfig>
            <ext:ColumnLayoutConfig FitHeight="false" />
        </LayoutConfig>
    Please note that AutoHeight="true" is just css 'height:auto;' and it can't work in all cases, see
    http://dev.sencha.com/deploy/dev/doc...ber=autoHeight

    Quote Originally Posted by sadaf View Post
    2) I want the form to size the controls when the browser screen size changes, I've tried putting MonitorResize everywhere and it has no effect. How can I make that work?
    Please set MonitorResize="true" for Panel1.
    <ext:Panel ID="Panel1" ... MonitorResize="true">
  3. #3

    Excellent

    Excellent, that works, thankyou! :D:

    14 minute response time... not bad!

Similar Threads

  1. [CLOSED] AutoHeight/Fit-Height ... Problems with UseControls
    By macap in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 08, 2011, 9:43 AM
  2. [CLOSED] Form validation not working with column LayOut
    By Shanti in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 08, 2011, 4:07 PM
  3. Replies: 3
    Last Post: Nov 22, 2010, 2:32 PM
  4. [CLOSED] Column layout same height with button row
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 07, 2010, 8:11 AM
  5. [CLOSED] Basic Layout question for Layout Fit / AutoHeight
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 07, 2010, 11:57 AM

Tags for this Thread

Posting Permissions