[CLOSED] Tooltip and disabled TextArea

  1. #1

    [CLOSED] Tooltip and disabled TextArea

    Hi,

    I have a TextArea like this:

    <ext:TextArea ID="taComments" 
                runat="server" 
                ReadOnly="true" 
                Note="Comentario" 
                NoteAlign="Top" 
                DataIndex="DE_COMENTARIO" 
                Height="115" 
                Disabled="true" 
                DisabledClass=" "  >
          <ToolTips>
                <ext:ToolTip runat="server" Html="taComments.getValue()" />
          </ToolTips>
    </ext:TextArea>
    My problem is that when the text of TextArea is long I cant see all information, and the scrolls are disabled.

    A solution would be to use a tooltip, but the tooltip does not show.

    Is it possible to activate the scroll or tooltipp when text area is disabled?
    Last edited by Daniil; Dec 19, 2011 at 6:53 PM. Reason: [CLOSED]
  2. #2
    Hi,

    A disabled input HTML element doesn't fire any mouse events. which is the base of a ToolTip.

    Also disabled input HTML doesn't show scrollbars.

    I can't see a good solution for you with a disabled field.

    You should consider a possibility to disable a field in some other way.
  3. #3
    Disabled="true"            
    DisabledClass=" "
    this code works fine in Firefox (scrollbar is show), but not in IE and Chrome.
  4. #4
    I'm afraid there is no a cross-browser solution with Disabled="true".

    I would suggest you to consider a possibility to display TextArea's content in another way - for example, in an <ext:Label>.
  5. #5
    Ok, I used DisplayField because Label haven`t DataIndex property.

    But now, the text shown is not formatted, it is displayed on a single line.
  6. #6
    Please clarify did you set up respective Width and Height for the DisplayField? Or, maybe, is it an item of respective layout control?
  7. #7
    Sorry, I have explained wrong.
    I attached two images explanatory (first wiht DisplayField and second with TextArea.
    Click image for larger version. 

Name:	DisplayField.PNG 
Views:	116 
Size:	6.5 KB 
ID:	3590Click image for larger version. 

Name:	TextArea.PNG 
Views:	122 
Size:	7.2 KB 
ID:	3591
  8. #8
    All "\n" symbols of TextArea's text should be replaced with "<br/>" to show in a DisplayField.

    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>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Container runat="server" Width="250" Layout="ColumnLayout">
                <LayoutConfig>
                    <ext:ColumnLayoutConfig FitHeight="false" />
                </LayoutConfig>
                <Items>
                    <ext:TextArea ID="TextArea1" runat="server" Height="250" />
                    <ext:Button runat="server" Width="25" Icon="ArrowRight">
                        <Listeners>
                            <Click Handler="DisplayField1.setValue(TextArea1.getValue().replace(/\n/g, '&#160;<br />'));" />
                        </Listeners>
                    </ext:Button>            
                    <ext:DisplayField ID="DisplayField1" runat="server" ColumnWidth="0.5" />
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
  9. #9
    Thank so much again!!! :)

Similar Threads

  1. [CLOSED] disabled Gridpanel
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 14, 2011, 5:02 PM
  2. Replies: 4
    Last Post: Jun 30, 2011, 6:25 PM
  3. [CLOSED] [1.0] Disabled panel
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 14, 2011, 6:35 PM
  4. [CLOSED] [1.0] Disabled Radio
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Dec 27, 2010, 9:29 AM
  5. [CLOSED] ComboBox Disabled?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 13, 2008, 6:30 PM

Posting Permissions