PDA

View Full Version : tooltip not showing



javapurna
18 Apr 2013, 5:16 AM
hi every one ,

i am try to display tooltip in my app , but it is not showing for images/label . it is showing grid action column items images. please suggest me any configurations required


my code is like
//Ext.QuickTips.init();
Ext.tip.QuickTipManager.init();
Ext.apply(Ext.QuickTips.getQuickTip(), {
showDelay: 20, //ms

});

i am using tooltip

girish.arjunagi
18 Apr 2013, 6:17 AM
You can assign toolTip in the afterrender of the label or image. Try with the below code


{
xtype : 'label',
text : 'abc',
listeners : {
afterrender : function(srcCmp) {
Ext.create('Ext.tip.ToolTip', {
target : srcCmp.getEl(),
html : 'tool tip text'
});
}
}
}

javapurna
18 Apr 2013, 8:49 PM
thanks very much for replaying .


yes it is working fine, but i am using not only single lable . i am using tooltip my entire project (image,action items,labels).so i am using standard config tooltip it is not working . please help

girish.arjunagi
18 Apr 2013, 9:02 PM
I don't think we have the standard config as toolTip for (Image, action,items and label). So it will not work. Sencha should consider providing toolTip as a standard config for these components.

Ary_Fortune
10 May 2013, 7:01 AM
I tried what you had mentioned but even that did not work.

Below is the sample code that I have which does not work for toolTip0.
Please let me know what m I missing.

Ext.define('somepackage cant mention here...', {
extend: 'something cant mention here...',
constructor: function(config) {
config = config || {};
var me = this;


Ext.apply(config, ,
{
fields: [
{
name: 'flag',
xtype: 'button',
cls: 'icon-abc',
iconCls: 'icon_abc',
listeners: {
render: function(cmp) {
var toolTip = Ext.create('Ext.tip.ToolTip', {
closable:true,
padding: '0 0 0 0',
maxWidth:400,
width:800,
target: cmp.el,
html: "javascript:alert('Hi');",
getTargetXY: function() {
return [810, 340];
}
});

toolTip.on('show', function(){


toolTip.getEl().on('mouseover', function(){
toolTip.show();
});


Ext.get(targetId).on('mouseout', function(){
toolTip.hide();
});


});
}
}

],


});


me.callParent([config]);
}
});