How To Change The Header's Height Of Accordion

Posted By Vitaliy | April 08, 2012 | ExtJS 4.0.7
0 4381
Reply to thread

Js Code

Ext.create('Ext.panel.Panel', {
	title: 'Accordion Layout',
	cls: 'my-accordion',
	width: 300,
	height: 250,
	layout: 'accordion',
	defaults: {
		bodyStyle: 'padding:10px'
	},
	items: [{
		title: 'Panel 1',
		html: 'Panel 1 content'
	}, {
		title: 'Panel 2',
		html: 'Panel 2 content'
	}, {
		title: 'Panel 3',
		html: 'Panel 3 content'
	}],
	renderTo: Ext.getBody()
});
            

Window FAQ: Window With Header Tools

Posted By Vitaliy | March 21, 2012 | ExtJS 4.0.7
0 2535
Config option "tools": an array of Ext.panel.Tool configs/instances to be added to the header tool area.

Js Code

Ext.widget('window', {
	title: 'Test Window',
	html: 'Click on button',
	width: 300,
	height: 200,
	bodyPadding: 10,
	tools: [
		{
			type: 'refresh',
			tooltip: 'Refresh',
			handler: function (event, target, owner, tool) {
				this.up('window').update('Refresh clicked');
			}
		},
		{
			type: 'help',
			tooltip: 'Help',
			handler: function (event, target, owner, tool) {
				this.up('window').update('Help clicked');
			}
		},
		{
			type: 'search',
			tooltip: 'Search',
			handler: function (event, target, owner, tool) {
				this.up('window').update('Search clicked');
			}
		}
	],
	autoShow: true
});