Results 1 to 3 of 3

Thread: Tooltips Not Displaying

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
      0  

    Default Tooltips Not Displaying

    I have a panel that with dynamically added components. I wanted to add tooltips to the dynamic links but they do not display on hover. This is my code.
    Code:
    if (readonly)
    {
        component = new Ext.Component(
        {
            name: 'combo' + item.dbName,
            html: ' <a style="border-bottom:1px dashed black;"><b>' + listItems[0].value + '</b></a>',             autoEl:
                   {
                tag: 'span'
            }
        });
        this.add(component);
    
    
        tip = new Ext.tip.ToolTip(
        {
            target: component.name,
            html: tipText,
            showDelay: 500,
            dismissDelay: 3000 // Hide after 3 seconds hover
        });
        this.add(tip);
    }
    Why does this not display a tooltip? What am I missing?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    You can add 'data-qtip' attribute to DOM elements like your <a> element and when you mouse over the element it will automatically show the tooltip for you. There is an example here: http://docs.sencha.com/ext-js/4-1/#!...uickTipManager
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
      0  

    Default

    Thanks - I'll check out using the quicktip. Support suggested I use the component id for the target versus the component name. I added an id to my component, tested, and it worked. Appreciate the reply.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •