[CLOSED] Label Editor - Ellipsed text in labe, but want full text in editor

  1. #1

    [CLOSED] Label Editor - Ellipsed text in labe, but want full text in editor

    Hi, I have a label editor, the label shows the value ellipsed for a very long string, but when the user edits the label, I want to show the full string, and not the ellipsed string...

    How can I do that?

    <ext:Label ID="txtTitle" runat="server" Html="Activity Title" StyleSpec="font-size:18pt"
                                                Width="400"> 
                                                <Editor> 
                                                    <ext:Editor ID="Editor1" runat="server" AutoSize="Width" Height="60"  >
                                                        <Listeners>
                                                        <BeforeStartEdit Handler="#{Editor1}.setValue(#{hidTitle}.getValue());" />
                                                   <BeforeShow Handler="alert('bef sho'); />
    
    
                                                            <Complete Handler="Ext.net.DirectMethods.TitleEdit(value,#{gridActivities}.getSelectionModel().getSelected().data.ActivityInProgressId,
                                              {
                                              success: function ()
                                              { 
                                              if (value.length>60)
                                                    #{txtTitle}.setText(value.substring(0,60));
                                                       #{hidTitle}.setValue(value)
                                              }
                                              });" />
                                                        </Listeners>
                                                       
                                                    </ext:Editor>
                                                    
                                                </Editor>
                                            </ext:Label>
    Last edited by Daniil; Sep 29, 2011 at 7:21 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please see the example.

    Example

    <%@ Page Language="C#" %>
    
    <%@ 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>Ext.Net Example</title>
    
        <style type="text/css">
            .ellipsis {
                text-overflow: ellipsis !important;
                white-space: nowrap !important;
                overflow: hidden !important;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Container runat="server" Width="100" Cls="ellipsis">
                <Items>
                    <ext:Label ID="Label1" runat="server" Text="Some loooooooooooooooooooong text">
                        <Editor>
                            <ext:Editor runat="server" AllowBlur="false">
                                <Listeners>
                                    <Show Handler="this.field.setWidth(Label1.getText().length * 7);" />
                                </Listeners>
                            </ext:Editor>
                        </Editor>
                    </ext:Label>
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] Not able to Copy the Text from HTML Editor
    By speedstepmem3 in forum 1.x Premium Help
    Replies: 1
    Last Post: Nov 21, 2011, 8:10 AM
  2. Replies: 4
    Last Post: Sep 19, 2011, 1:31 PM
  3. Editor text and combobox
    By threewonders in forum 1.x Help
    Replies: 1
    Last Post: May 21, 2011, 11:25 AM
  4. HTMl Editor Clear Text.
    By grmontero in forum 1.x Help
    Replies: 3
    Last Post: Oct 01, 2009, 7:49 PM
  5. ComboBox in GP Editor - Display Text Vs Value
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2009, 4:47 PM

Posting Permissions