Here is my solution (it works for extJs 3.3.3):
To add an extra class, I called it "x-toolbar-gray-btn":
xtype: 'button', id: 'processButton', text: 'Process', ctCls: 'x-toolbar-grey-btn'
Styles for the extra class in a separate CSS file:
.x-toolbar-grey-btn .x-btn-tl{ background-position: 0 0; } .x-toolbar-grey-btn .x-btn-tr{ background-position: -3px 0; } .x-toolbar-grey-btn .x-btn-tc{ background-position: 0 -6px; } .x-toolbar-grey-btn .x-btn-ml{ background-position: 0 -24px; } .x-toolbar-grey-btn .x-btn-mr{ background-position: -3px -24px; } .x-toolbar-grey-btn .x-btn-mc{ background-position: 0 -1096px; } .x-toolbar-grey-btn .x-btn-bl{ background-position: 0 -3px; } .x-toolbar-grey-btn .x-btn-br{ background-position: -3px -3px; } .x-toolbar-grey-btn .x-btn-bc{ background-position: 0 -15px; } .x-toolbar-grey-btn button{ font-weight: bold; }
Since the images of the Ext button are in the file '/ext-3.3.3/resources/images/default/button/btn.gif', I changed the background-position property. It looks like a built-in button.
Andriy leshchuk
source share