PDA

View Full Version : Tooltips: header:false, title:null does not eliminate the tooltip title element



rjanos
14 Sep 2010, 11:50 AM
Can anybody tell me how to not display titles on a tooltip. I am trying this:


Ext.apply(Ext.QuickTips.getQuickTip(), {
maxWidth: 300,
minWidth: 100,
showDelay: 50,
floating: true,
trackMouse: false
});

and then:


Ext.QuickTips.register({
target: targetId,
title: null,
text: tooltip.text,
header: false,
style: {
"margin-left": "-20px"
},
width: 200,
dismissDelay: 3000
});

No matter what I do, the header stays and its background shows up as a small line on the top part of the toolbar. Can anybody tell me what I do wrong?

Also, I tried to set extra style to the tooltip, to move it inward on the dialog but the style configuration (see style) does not show up. Any ideas?

thanks,
Janos

rjanos
14 Sep 2010, 12:33 PM
I found solutions for both of my problems. I am posting it here for others, if they need it. Also, if you know of a better solution, please post it.

Tooltip title to not show: init(false) and the 'elements' config param set to 'body'.



Ext.QuickTips.init(false);
Ext.apply(Ext.QuickTips.getQuickTip(), {
elements:'body',
maxWidth: 300,
minWidth: 100,
showDelay: 50,
floating: true,
trackMouse: false
});



Move tooltip backwards 100px from where EXTJS is inserting it:


var tooltip = Ext.QuickTips.getQuickTip();
tooltip.showAtOrig = tooltip.showAt.createDelegate(tooltip);
tooltip.showAt = function(xy) {
xy[0] = xy[0] - 100;
this.showAtOrig(xy);
};