[CLOSED] [#153] FieldContainer LabelAlign "Top" with AnchorLayout

  1. #1

    [CLOSED] [#153] FieldContainer LabelAlign "Top" with AnchorLayout

    Hi,

    I am currently on ExtJS version 4.2.0.489 and I am having problems with FieldContainer when its LabelAlign property is set to "Top" and LayoutConfig property set to "Anchor". I can't seem to anchor the component inside the FieldContainer to 100%. Setting the width explicitly doesn't change anything either.

    
    <html>
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" ScriptMode="Debug" Theme="Gray"
            DisableViewState="true" />
        <ext:Panel runat="server" Height="500" Width="500">
            <LayoutConfig>
                <ext:AnchorLayoutConfig>
                </ext:AnchorLayoutConfig>
            </LayoutConfig>
            <Items>
                <ext:FieldContainer runat="server" FieldLabel="Combo Box" LabelAlign="Top" Anchor="100%">
                    <LayoutConfig>
                        <ext:AnchorLayoutConfig>
                        </ext:AnchorLayoutConfig>
                    </LayoutConfig>
                    <Items>
                        <ext:ComboBox runat="server" Anchor="100%">
                        </ext:ComboBox>
                    </Items>
                </ext:FieldContainer>
            </Items>
        </ext:Panel>
        </form>
    </body>
    </html>
    Last edited by Baidaly; Mar 15, 2013 at 2:43 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Thanks for the report. I reproduced the bug in pure ExtJS sample also
    Here is bug report
    http://www.sencha.com/forum/showthre...t-resize-items

    At this moment, I can suggest to use Form layout
    <ext:Panel runat="server" Height="500" Width="500" Layout="FormLayout">        
                <Items>
                    <ext:FieldContainer runat="server" FieldLabel="Combo Box" LabelAlign="Top" Layout="FormLayout">                
                        <Items>
                            <ext:TextField runat="server">
                            </ext:TextField>
                        </Items>
                    </ext:FieldContainer>
                </Items>
            </ext:Panel>
  3. #3
    A defect ticket has been created to track this issue.

    https://github.com/extnet/Ext.NET/issues/153
    Geoffrey McGill
    Founder
  4. #4
    Thanks for the prompt reply. The temporary fix you gave me works in Ext.Net. But I'm actually doing this in pure ExtJS, seems like they do not have Form Layout anymore, is that correct?

    Quote Originally Posted by Vladimir View Post
    Hi,

    Thanks for the report. I reproduced the bug in pure ExtJS sample also
    Here is bug report
    http://www.sencha.com/forum/showthre...t-resize-items

    At this moment, I can suggest to use Form layout
    <ext:Panel runat="server" Height="500" Width="500" Layout="FormLayout">        
                <Items>
                    <ext:FieldContainer runat="server" FieldLabel="Combo Box" LabelAlign="Top" Layout="FormLayout">                
                        <Items>
                            <ext:TextField runat="server">
                            </ext:TextField>
                        </Items>
                    </ext:FieldContainer>
                </Items>
            </ext:Panel>
  5. #5
    Latest versions of ExtJS have Form layout already
    http://docs.sencha.com/ext-js/4-1/#!...container.Form
  6. #6
    Oh, thanks, the Ext JS 3 Compatibility Layer was throwing an deprecate error so I was confused:

    'Form layout no longer exists, use a different container layout and allow each field's Field layout to apply labels. Falling back to anchor layout.'

    Anyway, thanks for your help!

    Quote Originally Posted by Vladimir View Post
    Latest versions of ExtJS have Form layout already
    http://docs.sencha.com/ext-js/4-1/#!...container.Form
  7. #7
    Quote Originally Posted by stratadev View Post
    Oh, thanks, the Ext JS 3 Compatibility Layer was throwing an deprecate error so I was confused:

    'Form layout no longer exists, use a different container layout and allow each field's Field layout to apply labels. Falling back to anchor layout.'

    Anyway, thanks for your help!
    As far as I can remember, the FormLayout was removed in ExtJS 4.0, not restored in ExtJS 4.1. So, maybe, are you using a compatibility script for ExtJS 4.0?
  8. #8
    Hello!

    It should be fixed in SVN and included to the next release (v2.2).

Similar Threads

  1. [CLOSED] FieldContainer CombineErrors="true"
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 01, 2012, 6:47 PM
  2. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  3. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  4. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Tags for this Thread

Posting Permissions