PDA

View Full Version : how to get component's window



Bogdan0x400
21 Feb 2011, 6:19 AM
How can I get a reference to the window if I have a reference to a window's child component?

Condor
21 Feb 2011, 6:29 AM
var win = component.findParentByType('window');

Bogdan0x400
21 Feb 2011, 6:29 AM
I can use the ownerCt property, but how can I move up the control hierarchy until I find the window component? Should I check for xtype == "window"?

Bogdan0x400
21 Feb 2011, 6:30 AM
Thanks, Condor, that's definitely better than what I've planned doing.