PDA

View Full Version : layout unclickable panel



wehtam
2 Aug 2007, 1:30 AM
Hello,
I have a complexe layout and in my center region I have 2 content panels.
I want to configure my content panels like this :
content panel 1 selectable and content panel 2 unselectable but selectable only on button click .
How can I do ?

My code :

Example = function(){
var layout;
return {
init : function(){
layout = new Ext.BorderLayout(document.body, {
hideOnLayout: true,
west: {
split:true,
initialSize: 220,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},


center: {
titlebar: true,
autoScroll:true
}
});



layout.beginUpdate();
layout.add('west', new Ext.ContentPanel('west', {title: 'Zones g&eacuteographiques'}));
layout.add('center', new Ext.ContentPanel('add_zone', {title: 'Nouvelle zone', closable: false}));
layout.add('center', new Ext.ContentPanel('set_zone', {title: 'Modification zone', closable: false}));
//layout.getRegion('center').hidePanel('add_zone');
//layout.getRegion('center').hidePanel('set_zone');

layout.getRegion('center').showPanel('add_zone');

layout.endUpdate();
},

chargePanel : function(id){
var center = layout.getRegion('center');
// center.getPanel('add_zone').setUrl({url: 'addGibier.php', scripts: true});

center.showPanel('add_zone');

// alert(center);

}
,

modifZone : function(id){
var center = layout.getRegion('center');
// center.getPanel('add_zone').setUrl({url: 'addGibier.php', scripts: true});

center.showPanel('set_zone');
// alert(center);

}

}

}();
Ext.EventManager.onDocumentReady(Example.init, Example, true);


ps : sorry for my very very bad english :">:">

Thanks