PDA

View Full Version : Tooltip on click not on mouse over



Sadd
12 Jul 2012, 6:43 AM
I'm looking for documentation or a plugin to override the deafult behavior of tooltip.

scottmartin
12 Jul 2012, 1:58 PM
Have a look at the source .. it has the events for mouseover, etc..
add one for click (same idea as when you click and it disappears)

http://docs.sencha.com/ext-js/4-1/source/ToolTip.html#Ext-tip-ToolTip

Scott.

skirtle
12 Jul 2012, 2:51 PM
var tip = Ext.create('Ext.tip.Tip', {
html: 'Tip contents',
title: 'Tip title'
});

Ext.create('Ext.panel.Panel', {
height: 100,
html: 'Click Me',
renderTo: Ext.getBody(),
width: 100,
listeners: {
el: {
click: function(ev) {
tip.showAt(ev.getXY())
}
}
}
});