[CLOSED] Ext.net 2v Beta Release: DisplayField don't wrap text.

  1. #1

    [CLOSED] Ext.net 2v Beta Release: DisplayField don't wrap text.

    Hi

    In sample bellow, the displayfield don´t show all text:
    I think that I don´t set a approprieted property to Wrap text...

    Attachment 3998

    <%@ Page Language="vb"  %>
    <%@ 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>
        <ext:ResourceManager ID="resManagerDividas" runat="server" Locale="pt-BR" />
        <form id="form1" runat="server">
        <ext:FieldSet runat="server" ID="fsSolicitacao" Title="Solicitação de Cotação de Preços" Layout="AbsoluteLayout" Height="105px" Width="470px" Cls="my-fieldset">
            <Defaults>
                <ext:Parameter Name="LabelAlign" Value="top" Mode="Value" />
            </Defaults>
            <Items>
                <ext:TextField runat="server" ID="txt1" FieldLabel="Label" x="0" Y="0" Width="120"/>
                <ext:DisplayField runat="server" ID="dsMsg" X="5" Y="55" Width="440px" Height="80px" LabelWidth="440" text="*Encerrada a data de validade da senha, o usuário terá que pedir uma nova senha para o administrador. Deixe em branco esta data se a senha do usuário nunca expirar."/>
            </Items>
        </ext:FieldSet>
        </form>
    </body>
    </html>
    Last edited by Daniil; Mar 26, 2012 at 3:24 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Confirmed, this
    LabelAlign="Top"
    with empty FieldLabel causes this problem.

    Here is a simplified sample to reproduce.

    Example
    <%@ Page Language="C#"  %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            string text = "";
            for (int i = 0; i < 50; i++)
            {
                text += "test ";
            }
    
            this.DisplayField1.Text = text;
        }
    </script>
     
    <!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 v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:DisplayField
            ID="DisplayField1"
            runat="server" 
            Width="440" 
            Height="80" 
            LabelAlign="Top" />
    </body>
    </html>
    For you case I can suggest to set up LabelAlign="Right" as a temporary workaround.
  3. #3
    Hi Daniil!

    I'm setting the property LabelAlign to 'Right' and the text is missing...

    <%@ Page Language="vb"  %>
    <%@ 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>
        <ext:ResourceManager ID="resManagerDividas" runat="server" Locale="pt-BR" />
        <form id="form1" runat="server">
        <ext:FieldSet runat="server" ID="fsSolicitacao" Title="Solicitação de Cotação de Preços" Layout="AbsoluteLayout" Height="105px" Width="470px" Cls="my-fieldset">
            <Defaults>
                <ext:Parameter Name="LabelAlign" Value="top" Mode="Value" />
            </Defaults>
            <Items>
                <ext:TextField runat="server" ID="txt1" FieldLabel="Label" x="0" Y="0" Width="120"/>
                <ext:DisplayField runat="server" ID="dsMsg" X="5" Y="55" Width="440px" Height="80px" LabelWidth="440" LabelAlign="Right" text="*Encerrada a data de validade da senha, o usuário terá que pedir uma nova senha para o administrador. Deixe em branco esta data se a senha do usuário nunca expirar."/>
            </Items>
        </ext:FieldSet>
        </form>
    </body>
    </html>
  4. #4
    I guess you test with IE. There is some additional padding in IE. If you'd increase the FieldSet Height (at least, on 20 pixels), you will see the DisplayField.

    Though we are investigating a way to remove that additional padding.

    Here is the example to test with. The issue appears to be reproducible in IE only.

    Example
    <%@ Page Language="C#"  %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            string text = "";
            for (int i = 0; i < 50; i++)
            {
                text += "test ";
            }
     
            this.DisplayField1.Text = text;
        }
    </script>
      
    <!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 v2 Example</title>
    
        <style type="text/css">
            .x-ie .x-fieldset .x-fieldset-body {
                padding-top: 0px;
            }
            
            .my-fieldset {
                padding-top: 0px;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:FieldSet runat="server" Title="Title" Cls="my-fieldset">
            <Items>
                <ext:DisplayField
                    ID="DisplayField1"
                    runat="server"
                    Width="440"
                    Height="80" />
            </Items>
        </ext:FieldSet>
    </body>
    </html>
  5. #5
    Ok...
    The text are centered in vertical position of middle of component....

    I set the 'Height' property of displayfield to 20px and works fine...
  6. #6
    Yes, it's just middle vertical align.

    Apart from increasing the FieldSet Height you can:

    1. Remove the DisplayField Height.

    2. Or, if you need the DisplayField Height, you can align Text on top.

    Set up
    Cls="my-align"
    for the DisplayField.

    Here the CSS rule.
    <style type="text/css">
        .my-align td {
            vertical-align: top;
        }
    </style>
  7. #7
    Ok!

    Works fine!

    Thanks a lot, Daniil.

Similar Threads

  1. 2.x Beta Release 2
    By GKG4 in forum 2.x Help
    Replies: 4
    Last Post: May 11, 2012, 11:47 AM
  2. [CLOSED] Ext.net 2 Beta Release: Error when rebuilding grid
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 13, 2012, 7:47 PM
  3. [CLOSED] Ext.net 2v Beta Release: Calendar
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 28, 2012, 11:13 AM
  4. Replies: 7
    Last Post: Mar 22, 2012, 1:17 PM
  5. Replies: 2
    Last Post: Mar 16, 2012, 5:54 PM

Posting Permissions