PDA

View Full Version : Tooltip in boxComponent



lucia_mgv
22 Nov 2010, 3:02 AM
Is there any way to put a tooltip in a boxComponent?? I know that I can put a tooltip in a button, tab or toolbar item, but what about if I want to put a tooltip in an image or something else?

Screamy
22 Nov 2010, 7:16 AM
Give your BoxComponent an id of 'myBoxID', then create your ToolTip thusly:



var toolTime = new Ext.ToolTip({
target: 'myBoxID',
html: 'A very simple tooltip'
});

Condor
22 Nov 2010, 8:22 AM
Or:

{
xtype: 'box',
autoEl: {
tag: 'img',
src: 'image.gif',
'ext:qtip': 'Tooltip'
}
}
(with Ext.QuickTips initialized)

lucia_mgv
22 Nov 2010, 2:33 PM
Thank youuu!

that worked! both solutions!