首先定义css样式
<style type="text/css">
.settings{background: url(images/settings.png) no-repeat !important;}
</style>
然后创建grid
var test_grid = Ext.create('Ext.grid.Panel',{
title: 'Test',
id: 'test_grid_id',
bbar: [
'->',
{text: 'test', iconCls: 'settings',handler: function(){
alert("test!!");
}},
],
columns: [
{text: "MsgId", dataIndex: 'MsgId',hidden: true},
{text: "Read", dataIndex: 'Read'},
{text: "Subject", flex: 1, dataIndex: 'Subject'}
]
});