extjs4 window 从父窗口弹出
时间: 2023-08-26 13:40:05 浏览: 116
您好!要将ExtJS4窗口从父窗口弹出,您可以按照以下步骤操作:
1. 定义父窗口,如:
```
Ext.create('Ext.window.Window', {
title: '父窗口',
width: 400,
height: 300,
layout: 'fit',
items: [{
xtype: 'button',
text: '打开子窗口',
handler: function() {
// 在这里打开子窗口
}
}]
}).show();
```
2. 在父窗口的按钮的处理程序中打开子窗口,如:
```
handler: function() {
Ext.create('Ext.window.Window', {
title: '子窗口',
width: 300,
height: 200,
layout: 'fit',
items: [{
xtype: 'panel',
html: '这是子窗口'
}]
}).show();
}
```
3. 在子窗口中设置`parent`属性为父窗口,如:
```
Ext.create('Ext.window.Window', {
title: '子窗口',
width: 300,
height: 200,
layout: 'fit',
parent: parentWindow, // 设置parent属性为父窗口
items: [{
xtype: 'panel',
html: '这是子窗口'
}]
}).show();
```
这样就可以将子窗口从父窗口弹出了。希望对您有所帮助!
阅读全文
相关推荐












