[CLOSED] FieldLabel in flowlayout within IE7

  1. #1

    [CLOSED] FieldLabel in flowlayout within IE7

    I'm using a flow layout as described here http://forums.ext.net/showthread.php?13917-Panel-Flow-(-)-Layout, the first method, but I get the same result with the second.
    It works in every modern browser, but in IE7 I have a problem with FieldLabels, it gets rendered this way



    It seems a problem with position, float and clear that IE7 doesn't manage correctly.
    The page markup is this

    <!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 runat="server" />
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:Container runat="server" AutoHeight="true" Layout="ColumnLayout">
                    <LayoutConfig>
                        <ext:ColumnLayoutConfig FitHeight="false" />
                    </LayoutConfig>
                    <Items>
                        <ext:Label runat="server" FieldLabel="label2" Text="value2" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label21" Text="value21" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label22" Text="value22" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label23" Text="value23" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label24" Text="value24" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label25" Text="value25" Width="200" LabelWidth="100" />
                        <ext:Label runat="server" FieldLabel="label26" Text="value26" Width="200" LabelWidth="100" />
                    </Items>
                </ext:Container>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Thanks for help.
    Last edited by Daniil; Mar 26, 2012 at 9:50 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Welcome to Ext.NET!

    To get it working in IE7 you should use FieldLabel within a Container with Layout="FormLayout".

    Example
    <%@ Page Language="C#" %>
     
    <!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>Ext.NET Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Container runat="server" AutoHeight="true" Layout="ColumnLayout">
            <LayoutConfig>
                <ext:ColumnLayoutConfig FitHeight="false" />
            </LayoutConfig>
            <Items>
                <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label1" Text="value1" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label2" Text="value2" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label3" Text="value3" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label4" Text="value4" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label5" Text="value5" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label6" Text="value6" />
                    </Items>
                </ext:Container>
                    <ext:Container runat="server" Layout="FormLayout" Width="200">
                    <Items>
                        <ext:Label runat="server" FieldLabel="label7" Text="value7" />
                    </Items>
                </ext:Container>
            </Items>
        </ext:Container>
    </body>
    </html>
    Generally, I would recommend to use FieldLabel only within a FormLayout context to avoid such issue in the future.

    Also to avoid these additions containers you could remove FieldLabels at all and use common <ext:Label>-s instead.

    Example
    <%@ Page Language="C#" %>
     
    <!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>Ext.NET Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Container runat="server" AutoHeight="true" Layout="ColumnLayout">
            <LayoutConfig>
                <ext:ColumnLayoutConfig FitHeight="false" />
            </LayoutConfig>
            <Items>
                <ext:Label runat="server" Text="FieldLabel1:" Width="100" />
                <ext:Label runat="server" Text="Label1" Width="100" />
                <ext:Label runat="server" Text="FieldLabel2:" Width="100" />
                <ext:Label runat="server" Text="Label2" Width="100" />
                <ext:Label runat="server" Text="FieldLabel3:" Width="100" />
                <ext:Label runat="server" Text="Label3" Width="100" />
            </Items>
        </ext:Container>
    </body>
    </html>

Similar Threads

  1. [CLOSED] where is flowlayout
    By lonely7345 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 21, 2011, 7:45 AM
  2. [CLOSED] Change FieldLabel
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 12, 2010, 5:07 PM
  3. [CLOSED] Textfield Fieldlabel
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Dec 02, 2009, 5:45 PM
  4. [CLOSED] FieldLabel for RadioGroup
    By alexp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 16, 2009, 11:38 AM
  5. [CLOSED] FieldLabel width
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 14, 2009, 9:27 AM

Tags for this Thread

Posting Permissions