[OPEN] [#1872] Behavior or LabeAlign="top"

  1. #1

    [OPEN] [#1872] Behavior or LabeAlign="top"

    Hello

    in following example, why the second dropdown have half size of the first one please?
    Is that default behavior of the align=Top ?

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Dropdown field with multi selection example</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Window runat="server" Layout="fit" Width="500">
                <Items>
    	            <ext:Panel Frame="False" runat="server" >
    		            <LayoutConfig>
    			            <ext:VBoxLayoutConfig Align="Stretch" />
    		            </LayoutConfig>
    		            <Items>
    			            <ext:FieldContainer runat="server" Flex="1">
    				            <LayoutConfig>
    					            <ext:VBoxLayoutConfig Align="Stretch" />
    				            </LayoutConfig>
    				            <Items>
    					            <ext:ComboBox runat="server" LabelAlign="Left" FieldLabel="Correctly stretched" IndicatorIcon="BulletRed"></ext:ComboBox>
    					            <ext:ComboBox runat="server" LabelAlign="Top" FieldLabel="Incorrectly streched" IndicatorIcon="BulletRed"></ext:ComboBox>
    				            </Items>
    			            </ext:FieldContainer>
    		            </Items>
    	            </ext:Panel>
                </Items>
            </ext:Window>
        </form>
    </body>
    </html>
  2. #2
    Hello, @jirihost! Interesting issue!

    It really looks wrong. As you can see, the second field is slightly shorter than the first, exactly what it would get with label alignment on left or right.

    There are some ways you will see the field fit correctly:

    a) remove the IndicatorIcon="" config
    b) use the field without a label (and use the ext:label component, it'll naturally be placed at top)
    c) use the FormLayout within the ext:FieldContainer

    It looks like the best bet for you is just use option (c). In any event, we logged issue #1872 to track this problem and ultimately post an update here once it gets fixed in the code.

    We'll need to run further investigations to get to the bottom of the issue, but it seems just that when the FieldIndicator feature is about to fit its icon, it simply ignores whether the field has the LabelAlign="Top" config set. In this case then, it should treat the width as if there was no label at all. The height should be the one changed by the label, and for the looks, this aspect works right.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Ok thanks
    feel free to close this thread
  4. #4
    Thanks for the feedback, glad it helped!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 0
    Last Post: Mar 13, 2014, 4:34 AM
  2. Replies: 0
    Last Post: Nov 15, 2013, 9:32 AM
  3. [CLOSED] TriggerField and "lookup" behavior when disabled
    By adrianot in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 17, 2013, 3:23 AM
  4. [CLOSED] [#153] FieldContainer LabelAlign "Top" with AnchorLayout
    By stratadev in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 15, 2013, 2:44 AM
  5. Replies: 1
    Last Post: Oct 21, 2011, 6:15 PM

Posting Permissions