PDA

View Full Version : Collapsing Panel with another function??



DavorZ
29 Mar 2011, 1:58 AM
Can a Panel be collapsed with another function, how to call collapse:true/false?? I attached image to see clearer what am I talking about...I do not need a whole layout, just a simple panel.. I searched forum and google, no this example...Please help.....:-/:-/

DavorZ
29 Mar 2011, 3:04 AM
Got it!!! :)):)):)):)):)):)):)):)):)):)):))



Ext.onReady(function(){

var example1 = new Ext.Panel({
applyTo:'top',
title:'Web',
height:500,
collapsible:true,
collapsed:true,
layout:'fit',
id:'panel1',

});

});

function collapse(){

Ext.getCmp('panel1').collapse(true);

}

function show(){

Ext.getCmp('panel1').expand(true);

}

(http://www.sencha.com/forum/showthread.php?128350-Collapsing-Panel-with-another-function)