PDA

View Full Version : extending tool tip



prakashkadakol
25 Jan 2012, 12:53 AM
hi

how i can extend tool tip that is wanna reset tool tip message used in the Editable grid panel.not able to get where exactly tool tip being called in grid panel.

Farish
25 Jan 2012, 2:06 AM
There is poor support for tooltips in ExtJS. Only a few components have tooltips which can be changed dynamically (e.g. buttons have setTooltip method). Here is a function I am using for having a tooltip displayed over the grid. You can call it after creation of the grid. "panel" here is the grid.


function create_tooltip_panel_body_grid(panel)
{
panel.on("afterrender", function(g) {
panel.tip = Ext.create('Ext.tip.ToolTip', {
target: panel.el,
delegate: '.x-grid-view',
trackMouse: true,
renderTo: Ext.getBody(),
listeners: {
beforeshow: function(tip) {
tip.update('hello world');
}
}
});
});
}

Regards,
Farish