[CLOSED] Node Tooltip and long non-breaking string

  1. #1

    [CLOSED] Node Tooltip and long non-breaking string

    Hi Guys,

    How can I force the tooltip on the node to display a long non-breaking string , now it just truncates the text. What are the limitations and are there any workarounds to force a word-break.

    See sample below




    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Multi Node TreePanel built using markup - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <h1>
            Multi Node TreePanel built using markup</h1>
        <ext:TreePanel ID="TreePanel1" runat="server" Width="300" Height="450" Icon="BookOpen"
            Title="Catalog" AutoScroll="true">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:Button ID="Button1" runat="server" Text="Expand All">
                            <Listeners>
                                <Click Handler="#{TreePanel1}.expandAll();" />
                            </Listeners>
                        </ext:Button>
                        <ext:Button ID="Button2" runat="server" Text="Collapse All">
                            <Listeners>
                                <Click Handler="#{TreePanel1}.collapseAll();" />
                            </Listeners>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Root>
                <ext:Node Text="Composers" Expanded="true">
                    <Children>
                        <ext:Node Text="Beethoven" Qtip ="This_is_a_long_non_breaking_string_that_I_using_for_my_tooltip_whats_best_way_to_handle" Icon="UserGray">
                            <Children>
                                <ext:Node Text="Concertos">
                                    <Children>
                                        <ext:Node Text="No. 1 - C" Icon="Music" Leaf="true" />
                                        <ext:Node Text="No. 2 - B-Flat Major" Icon="Music" Leaf="true" />
                                        <ext:Node Text="No. 3 - C Minor" Icon="Music" Leaf="true" />
                                        <ext:Node Text="No. 4 - G Major" Icon="Music" Leaf="true" />
                                        <ext:Node Text="No. 5 - E-Flat Major" Icon="Music" Leaf="true" />
                                    </Children>
                                </ext:Node>
                            </Children>
                        </ext:Node>
                    </Children>
                </ext:Node>
            </Root>
            <BottomBar>
                <ext:StatusBar ID="StatusBar1" runat="server" AutoClear="1500" />
            </BottomBar>
            <Listeners>
                <ItemClick Handler="#{StatusBar1}.setStatus({text: 'Node Selected: <b>' + record.data.text + '<br />', clear: false});" />
                <ItemExpand Handler="#{StatusBar1}.setStatus({text: 'Node Expanded: <b>' + item.data.text + '<br />', clear: false});"
                    Buffer="30" />
                <ItemCollapse Handler="#{StatusBar1}.setStatus({text: 'Node Collapsed: <b>' + item.data.text + '<br />', clear: false});"
                    Buffer="30" />
            </Listeners>
        </ext:TreePanel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Dec 18, 2012 at 5:35 AM. Reason: [CLOSED]
  2. #2
    Please let me know whether the following example helps you
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <style type="text/css">
            .wordWrap
            {
                word-wrap: break-word;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button Text="rap" runat="server">
            <ToolTips>
                <ext:ToolTip ID="ToolTip1" runat="server" Cls="wordWrap" Html="ExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNetExtNet" />
            </ToolTips>
        </ext:Button>
    </body>
    </html>
  3. #3
    For more information, please take a look on the following W3C reference:

    http://www.w3.org/TR/css3-text/#word-wrap
  4. #4
    Hello, @RCM!

    Please, try @RCN's example.
  5. #5
    Hi,

    How can apply the css to the quicktip gloablly so that it is applied to my tree nodes, I tried using below but it did not work.



    // Init the singleton.  Any tag-based quick tips will start working.
    Ext.tip.QuickTipManager.init();
    
    // Apply a set of config properties to the singleton
    Ext.apply(Ext.tip.QuickTipManager.getQuickTip(), {
        showDelay: 50,      // Show 50ms after entering target
        cls: 'wordWrap'
    });
  6. #6
    Hi,

    Maybe this can help.
    Ext.tip.QuickTipManager.getQuickTip().addCls('class');
    Also applying a global CSS rule could help.

    But please note that an <ext:ToolTip> is not a QuickTip.
  7. #7
    Hi,

    This call is returning 'undefined'

    Ext.tip.QuickTipManager.getQuickTip()
    any ideas why.
  8. #8
    I think it can return undefined if it is called before this:
    Ext.tip.QuickTipManager.init();
    Where do you call the getQuickTip function?

Similar Threads

  1. Replies: 9
    Last Post: Dec 12, 2012, 5:04 AM
  2. Replies: 1
    Last Post: Feb 28, 2011, 8:13 AM
  3. Replies: 7
    Last Post: Feb 17, 2011, 11:45 AM
  4. [CLOSED] Dictionary(of long, string) into a store
    By CMA in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 21, 2009, 7:21 AM
  5. Replies: 3
    Last Post: Nov 12, 2008, 5:16 AM

Posting Permissions