1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
    bkirkman is on a distinguished road

      0  

    Default Tooltips Not Displaying

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,013
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
    bkirkman is on a distinguished road

      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.

Thread Participants: 1

Tags for this Thread