PDA

View Full Version : How to hide/show panels.



TheBigOnion
14 Jun 2010, 9:03 AM
Hello all,
I am trying to hide items of a panel and show others.



var myTabPanel = {
....
items: [
{region: 'west',
id: 'myWest',
hidden: true
},{
region: 'east',
id: 'myEast',
items: [new Ext.Panel({
id: 'body-panel',
achor: '100% 100%'
})]
}
....

And I'm trying to:


handler: function(){
var wst = Ext.getCmp('myWest');
var est = Ext.getCmp('myEast');

est.hide();
est.doLayout();
wst.show();
wst.doLayout();


(of course this is not all the code, but the parts that should matter for my question.)

This does not have the effect I want.

I want to do like they do on the FeedViewer example. (without all the complicated code they have)

What is the best way to hide items and show others?

Thanks.

CrazyEnigma
14 Jun 2010, 1:57 PM
collapse/expand?!?