PDA

View Full Version : GetWindow method



Kapfe89
3 Dec 2009, 9:37 AM
Hi together,

i opened a lot of windows with different content. And the windows are generated dynamic, i don't now how much.



new win = new Ext.Window({
//some configs
buttons: [{text: 'Close',
handler: function(){ this.hide()}
}]
});


But this.hide hides only the button, but i want to hide the whole window.
Is there a method, for example: this.getWindow.hide(); ?

Thank your for your help
Martin

CrazyEnigma
3 Dec 2009, 9:44 AM
There is a hideParent for the button:


hideParent: true


or

because the handler is a click event, you can include the params


handler: function (b,e) {
// Get the window
var parent = b.findParentByType('window');
parent.hide();
}

husniadil
3 Dec 2009, 10:07 AM
this.ownerCt.ownerCt.hide();

Kapfe89
3 Dec 2009, 11:41 PM
Thanks for your answers... i tried this:


hideParent: true, but it didn't work.

But


this.ownerCt.ownerCt.hide();works perfectly.