PDA

View Full Version : dynamically setting ContentPanel for a layout



8 Feb 2007, 4:25 AM
Hi

Small query,

I add a contentPanel to layout
like :---


layout.add('west', new YAHOO.ext.ContentPanel('west', {title: 'West'}));


Now I from my function getPanel() {

}
can I get the ContentPanel added to layout.


I have this requirement because I want to dynamically set ContentPanel for a given layout and somehow save previous layout so that I can restore to old ContentPanel when required.


Thanks in advance.

Animal
8 Feb 2007, 4:42 AM
Just keep a reference to it instead of calling the constructor in the add() call.