PDA

View Full Version : How to move the toggle button right to left side in accordion layout?



karthis82
8 Mar 2013, 12:27 AM
Hi

This is the sample code for accordion layout.

Ext.create('Ext.panel.Panel', {
title: 'Accordion Layout',
width: 300,
height: 300,
defaults: {
// applied to each contained panel
bodyStyle: 'padding:15px'
},
layout: {
// layout-specific configs go here
type: 'accordion',
titleCollapse: false,
animate: true,
activeOnTop: true
},
items: [{
title: 'Panel 1',
html: 'Panel content!',
hideCollapseTool : true
},{
title: 'Panel 2',
html: 'Panel content!'
},{
title: 'Panel 3',
html: 'Panel content!'
}],
renderTo: Ext.getBody()
});

In this 'Panel 1' do not have toggle button. Others are having the toggle button which is used to collapse the panels. But those toggle buttons are placed by default in right side. I need those collapse button to left side. How to move the toggle button right to left side in accordion layout?

mitchellsimoens
10 Mar 2013, 8:44 PM
There is no config to do this. You would have to handle it manually by adding the toggle tool yourself and setting the listener to the panel itself.

kimonp
6 Jan 2014, 3:36 PM
It would be nice to add this option to the config-- I'd like to do this too