比如我电“打开” 按钮,则窗口从打开按钮的地方弹出来。
这个一般在show方法上面做文章
show方法第一个参数指定为按钮元素就可以了,如下
[code="js"]var win = new Ext.Window({
title:'window'
width:300,
height:400
});
win.show('打开按钮'.el);[/code]
show( [String/Element animateTarget], [Function callback], [Object scope] ) : void
Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
Parameters:
* animateTarget : String/Element
(optional) The target element or id from which the window should animate while opening (defaults to undefined with no animation)
* callback : Function
(optional) A callback function to call after the window is displayed
* scope : Object
(optional) The scope in which to execute the callback
Returns:
* void