[CLOSED] Field and FieldContainer layout exception in form

  1. #1

    [CLOSED] Field and FieldContainer layout exception in form

    Hi guys, here is the code:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body id="theBody">
        <form id="form1" runat="server">
            <ext:ResourceManager ID="theManager" runat="server" 
                IDMode="Static"
                Theme="Default"
                ShowWarningOnAjaxFailure="false"
                ScriptMode="Debug" />
            <ext:Viewport runat="server" Layout="FitLayout">
                <Items>
                    <ext:Panel runat="server" ID="pTest" Layout="FormLayout" BodyStyle="padding:20px;">
                        <TopBar>
                            <ext:Toolbar runat="server">
                                <Items>
                                    <ext:Button runat="server" Text="AAAA">
                                        <Listeners>
                                            <Click Handler="testFunc();" />
                                        </Listeners>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <Items>
                            <ext:TextField runat="server" Width="200" FieldLabel="Field1" />
                            <ext:FieldContainer runat="server" AnchorHorizontal="100%" Layout="HBoxLayout">
                                <Items>
                                    <ext:TextField runat="server" Width="200" FieldLabel="Field2" />
                                    <ext:Checkbox runat="server" BoxLabel="Haha" />
                                </Items> 
                            </ext:FieldContainer>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    <script runat="server">
    
    
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }
    
    
    </script>
    I felt upset to see two fields, even with same width value, were placed in such a nasty way (attached).
    Any ideas?
    Attached Thumbnails Click image for larger version. 

Name:	error.jpg 
Views:	123 
Size:	19.8 KB 
ID:	4618  
    Last edited by Daniil; Aug 13, 2012 at 2:04 PM. Reason: [CLOSED]
  2. #2
    Hi,

    FormLayout in Ext.NET v2 just places fields one under another and stretches to the Container width.
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.Form

    It ignores Width and Anchor settings.

    I think you should use AnchorLayout.

    Though, I think, there is a real issue with FormLayout. We will investigate. Thanks for the report.
  3. #3
    Quote Originally Posted by Daniil View Post
    Though, I think, there is a real issue with FormLayout. We will investigate. Thanks for the report.
    I have discovered a bug in our scripts. We are investigating a possible fix.
  4. #4
    The fix has been added to SVN. Thanks again for the report.

Similar Threads

  1. [CLOSED] How to exclude a field from the Form?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 30, 2012, 7:40 PM
  2. Replies: 3
    Last Post: Jun 20, 2012, 6:16 PM
  3. [CLOSED] form layout with composite field problem
    By dev in forum 1.x Legacy Premium Help
    Replies: 19
    Last Post: Aug 31, 2010, 8:42 AM
  4. [CLOSED] [1.0] Form field name attribute
    By SandorD in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2010, 7:39 AM
  5. [CLOSED] Need help with form layout
    By CSG in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 08, 2009, 6:54 AM

Posting Permissions