PDA

View Full Version : Prevent the close of ContentPanel



manm
7 Sep 2007, 8:18 AM
Hello,

can I prevent the closing of an ContentPanel, but the close button I needed for hide that panel.I saw that the ContentPanel haven't a close event.

thank you

genius551v
7 Sep 2007, 9:01 AM
try this:


init : function() {
.
.
.
west.on('beforeremove', this.beforeRemovePanel);
.
.
.
},

beforeRemovePanel : function(region, panel, e){
e.cancel = true;
region.hide();
}

manm
7 Sep 2007, 9:41 AM
Thank you, work perfect.