3
votes

I using calendar and in eventover function i have create tooltip like

                       'eventover': function(vw, rec, el){
                            new Ext.ToolTip({
                                target: el,
                                trackMouse: true,
                                html:   'test'
                            });
                        });

But that's not working at first time when i hover an event (I have to hover out and hover it again )

How to fix that thanks

2
Can you provide an example showing the issue ? Is this specific to your calendar or more general ? - Lorenz Meyer
Please post more code. eventover is not a documented event in ExtJs. - Lorenz Meyer

2 Answers

0
votes

You encounter this problem, because you are creating the Ext.ToolTip when hovering the mouse over the element. It then get's displayed on your next mouseover event.

Ext.ToolTip is bound to a target element and shows automatically when you hover that element. You must create the tooltip before you hover the element, and it will show when necessary. Since you cannot attach the tooltip to an element before it is rendered, a good place to define the tooltip is at the render event of the Ext.Component that contains the element with the tooltip.

0
votes

Just add the show() method

Ext.ToolTip({
        target: el,
        trackMouse: true,
        html:   'test'
    }).show();