Reputation: 9807
Does ExtJS provide a way to show icon for tab title in front of title instead of the default behavior?
Default Behviour:
---------------
| + Tab 1 |
---------------
Required Behavior:
---------------
| Tab 1 + |
---------------
Code Example:
Ext.create('Ext.tab.Panel', {
plain: true,
items: [{
title: "Tab 1",
iconCls: "icon-class-plus",
}, {
title: "Tab 2",
}],
renderTo: Ext.getBody()
});
icon-class-plus is a CSS class that contain &:after pseudo element for setting a glyph icon for plus sign.
Upvotes: 1
Views: 405
Reputation: 30082
Use the iconAlign
config:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.tab.Panel', {
items: [{
title: "Tab 1",
iconCls: "x-fa fa-car",
iconAlign: 'right'
}],
renderTo: Ext.getBody()
});
}
});
Upvotes: 3