PDA

View Full Version : How can I get the window by its container?



lengjuncc
15 Feb 2012, 6:50 PM
var p= Ext.create('widget.panel',{
items: [
Ext.create('widget.window', {
itemId: 'w',
constrain: true,
})
]
});

I can get the window by "p.getComponent('w')" in Extjs3.x, but it not work in Extjs4.x.
How can I get the window by its container in Extjs4.x ?

vietits
15 Feb 2012, 11:36 PM
Try config your window with floating: false.


var p = Ext.create('widget.panel',{
items: [
Ext.create('widget.window', {
itemId: 'w',
constrain: true,
floating: false,
...
})
]
});
console.log(p.getComponent('w'));