create a contentplaceHolder which will be in your west region
var contentplaceHolder = Ext.create('Ext.panel.Panel', {
height: 500,
listeners: {
click : {
element : 'el',
fn : function(){
//Expand the west region on click
Ext.getCmp('region_west').expand();
}
}
}
});
give an id to your west region and add listener like below
var tree1 = Ext.create('Ext.tree.Panel', {
title : " ",
xtype : 'treepanel',
store : store,
placeholder: contentplaceHolder,
id : 'tree1',
region : 'west',
height : 300,
width : '19%',
useArrows : true,
rootVisible : false,
collapsible:true,
collapsed: true,
expand : true,
listeners: {
click: {
element: 'el',
fn: function() {
Ext.getCmp('region_west').collapse();
}
}
}