[CLOSED] [1.3] Label Wordwrap on topbar

  1. #1

    [CLOSED] [1.3] Label Wordwrap on topbar

    Hi,
    I try to set wordwrap or similar to label inside a topbar but doesn't work.

    The follow is the 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 s = "S";
            for (int i = 0; i < 245; i++)
            {
                s += "l";
            }
            s += "E";
    
    
            lbl.Text = s;
        }
    </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 id="Head1" runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" CleanResourceUrl="false" />
        <ext:Panel runat="server" Width="400">
            <TopBar>
                <ext:Toolbar runat="server" Height="100" AutoDoLayout="true">
                    <Items>
                        <ext:Label runat="server" Height="100" ID="lbl" BoxMaxWidth="100" LabelAlign="Top" LabelSeparator=":"
                            FieldLabel="Text">
                        </ext:Label>
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Items>
            </Items>
        </ext:Panel>
    </body>
    </html>
    If I put the label inside a items collection the "wordwrap" works.
    What I wrong?

    Thanks
    Last edited by Daniil; Apr 03, 2012 at 1:44 PM. Reason: [CLOSED]
  2. #2
    Hi,

    You can set up
    Cls="my-label"
    for the label.

    The "my-label" CSS class definition:
    <style type="text/css">
        .my-label span {
            white-space: normal;
        }
    </style>
    But it works for white spaces only, i.e. for words separated by white spaces.

    There are no white spaces in the Label Text in your example. And it works the same for me neither it's within Toolbar Items or Panel Items.
  3. #3
    Thanks Daniil, its works

    thanks

Similar Threads

  1. [CLOSED] How to Apply Styles To TopBar
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 12, 2010, 3:36 AM
  2. [CLOSED] Topbar
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 29, 2010, 11:35 AM
  3. [CLOSED] Label Style / Obtain label color based on theme
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Apr 15, 2010, 10:35 AM
  4. [CLOSED] [1.0] Topbar
    By state in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 16, 2009, 9:29 PM
  5. WebUserControl in Topbar
    By reto.ruemmeli in forum 1.x Help
    Replies: 0
    Last Post: Mar 16, 2009, 12:34 PM

Posting Permissions