2011-09-14 67 views

回答

13

查看面板的tools配置。只需将其添加到网格的配置中即可:

Ext.create('Ext.grid.Panel', { 
    // ... 
    tools:[ 
    { 
     type:'help', 
     tooltip: 'Get Help', 
     handler: function(event, toolEl, panel){ 
      // show help here 
     } 
    }], 
    // ... 
}); 

Here is demo

+0

这正是我要找的,谢谢! – pm13

+0

ExtJS 3.4.0可以实现类似的行为吗? – Jay

+0

@Jay,是的。当然,请参阅文档http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.Panel-cfg-tools –