2

I am using ExtJS DataView for my image gallery. This is my way for item tooltip. It's in tpl.

 new Ext.XTemplate(
    '<tpl for=".">',
        '<div class="thumb-wrap" data-qtip="{shortname}">',
            '<img class="file-image" src="{thumb}" />',
        '</div>'
    '</tpl>'
 );

It's working correctly, but I want to set showDelay value for my tooltip.

Is there any way to set showDelay for dataview item tooltip?

MarthyM
  • 1,839
  • 2
  • 21
  • 23
jeewiya
  • 571
  • 11
  • 24

2 Answers2

7

Try implementing tooltips like this instead, it will give you all of the config options:

Add the following after you declare your grid (where myGridPanel is your Ext.grid.Panel). You may have to adjust it somewhat for your needs. Also take the tip out of the template.

myGridPanel.getView().on('render', function(view) {
    view.tip = Ext.create('Ext.tip.ToolTip', {
        target: view.el,
        delegate: view.itemSelector,
        trackMouse: true,
        minWidth: 300, 
        maxWidth: 500,
        dismissDelay: 0,
        showDelay: 800,
        renderTo: Ext.getBody(),
        listeners:{
            beforeshow: function updateTipBody(tip){
                tip.update(
                    view.getRecord(tip.triggerElement).get('shortname')
                );
            }
        }
    });
});  
egerardus
  • 11,316
  • 12
  • 80
  • 123
0

It's not possible: the "showDelay" property can not be set directly from markup.

From the Documentation: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tip.QuickTipManager

To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with the data- namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary of supported attributes (optional unless otherwise noted):

Unfortunately the "showDelay" property is not supported. So you have to find an other way to implement your quickTips.

speznaz
  • 98
  • 1
  • 10