PDA

View Full Version : Changing delay on Quicktip



blex2010
18 Nov 2010, 10:48 AM
Hi,

I'm using
ext:qtip="...

However when you hover the tip disappears after 5 seconds. I know how to change the delay on a quicktip object but how do I do it for tips created using the html method above? Also is there a way to set the default for all quicktips?

matt617
18 Nov 2010, 10:55 AM
good question! i honestly dont know that one, in Javascript you can do this (from the EXT docs):


Ext.QuickTips.register({
target: 'my-div',
title: 'My Tooltip',
text: 'This tooltip was added in code',
width: 100,
dismissDelay: 10000 // Hide after 10 seconds hover
});

Animal
18 Nov 2010, 10:56 AM
Yes, there is one instance of a ToolTip which is used to show qtip information.

So set http://dev.sencha.com/deploy/dev/docs/?class=Ext.ToolTip&member=dismissDelay on http://dev.sencha.com/deploy/dev/docs/?class=Ext.QuickTips&member=getQuickTip

blex2010
18 Nov 2010, 12:10 PM
Not sure I understand. I have about 100-500 ext:quicktips in an html document that are dynamically created (so could be more or less). Do I need to convert them all to explicit object instantiations?

Screamy
18 Nov 2010, 12:39 PM
In a nutshell, you can globally affect all QuickTips throughout your app by doing this somewhere in your setup code:



Ext.apply(Ext.QuickTips.getQuickTip(), {
dismissDelay: 0
});


In this case, zero means only dismiss when I click elsewhere.

Animal
18 Nov 2010, 1:05 PM
The whole thing about qtip is that there are not hundreds of QuickTip objects floating about. There is one instance, and you get it using the method I linked to, and set the config I linked to (Just as Screamy showed).

blex2010
18 Nov 2010, 1:21 PM
Perfect. Thanks! By the way any idea why that's not the default? When would you want it to close before you had a chance to read it?

kentryan
1 Sep 2015, 4:36 AM
this will solve it! working with me :) Ext.tip.QuickTipManager.init(true,{ dismissDelay: 20000 });