PDA

View Full Version : button in the accodion layout



lavap
7 Apr 2010, 10:12 PM
Hi,


I had created a border layout and included accordion layout in the west region with 3 pannels.
Now I want to add a button in the pannel such a way when I click that button it has to open another pannel in the same accodion layout..

Can anyone help me in this ...

Here is my code..



Ext.ns('test');
test.app = function(){
return{
init: function(){
var viewport = new Ext.Viewport({
layout: 'border',
items: [
{
region: 'west',
layout:'accordion',
width:300,
items:[{
title: 'pannel1',
autoLoad: 'sw.txt'
},{
title: 'pannel2',
autoLoad: 'dsa.txt'
},{
title:'pannel3',
autoLoad:'oops.txt'
}]

},
return viewport
}
};
}();

jay@moduscreate.com
8 Apr 2010, 9:05 AM
Leela, setup a button in the tbar or bbar that adds the item to the accordion layout panel.

See: http://www.extjs.com/learn/Ext_2_Overview#Container_Model

lavap
8 Apr 2010, 7:25 PM
Hi,


I want to add a button in one of the pannel in the accordion layout....
can u plz send me the modified code ....