PDA

View Full Version : Controlling Ext.ToolTip manually.



v.madhu
29 Oct 2009, 6:11 AM
Hello,

I want to show/hide tooltip programatically. I did using funtion show() and hide() it worked. But when i mouseover the element the tooltip is appearing automatically.
Is there any option to disable this mouseover?

Please help!

Animal
29 Oct 2009, 6:42 AM
You mean make it not a tooltip, but just a Component that you can show anywhere you want to?

Create an Ext.Tip, and show it and hide it programatically.

Tooltip is the subclass which has the "target" config and adds mouseover listeners etc.

Tip is the superclass which displays the nice UI.

v.madhu
2 Nov 2009, 8:33 PM
Thanks for your replay. I followed your idea. It worked. But one problem.
Previously, the tool tip was assigned to some Components. So the tool tip is pointing the Component (i mean the arrow mark).

When i show() / hide() tool tip without assigning to any component the "Arrow" is missing.
Please tell how can i make the tool tip to show the "Arrow"?

v.madhu
2 Nov 2009, 8:59 PM
I added the arrow thru the following code.



Ext.override(Ext.ToolTip, {
showAt : function(xy){
this.lastActive = new Date();
this.clearTimers();
Ext.ToolTip.superclass.showAt.call(this, xy);
if(this.dismissDelay && this.autoHide !== false){
this.dismissTimer = this.hide.defer(this.dismissDelay, this);
}

if(this.anchor && !this.anchorEl.isVisible()){
this.syncAnchor();
this.anchorEl.show();
}
}
});