Hi sukina,
I am defining a example below that shows the tooltip on the button. The tooltip contains a table of two columns. Just define the data according to your need & youcan also customize table according to your need.
Code:
var btn = Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});
var tip = Ext.create('Ext.tip.ToolTip', {
target: btn .el.id,
layout: 'fit',
items:{
xtype: 'box'
, data: [
{name: 'XXX', age: '23'},
{name: 'YYY', age: '21'},
{name: 'ZZZ', age: '32'}
]
, tpl: new Ext.XTemplate(
'<table border="1" width="100" cellspacing="2" cellpadding="5">',
'<tpl for=".">',
'<tr width="50%">',
'<td>{name}</td><td>{age}</td>',
'</tr>',
'</tpl>',
'</table>'
)
}
});