PDA

View Full Version : Center ext:window on window resizing



matteo
Oct 02, 2008, 7:02 AM
Well a very (very) simple example, but maybe usefull also to you:



<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" Theme="Default" runat="server">
<Listeners>
<WindowResize Handler=" {Window1}.getEl().center(Ext.getBody()); " />
</Listeners>
</ext:ScriptManager>
<ext:Window ID="Window1" runat="server" Maximizable="true" Closable="false" Collapsible="true" Icon="Application" Title="Title">
<Content>
<p>hello</p>
</Content>
<Listeners>
<Maximize Handler="var view = Ext.getBody().getViewSize(); el.setSize(view.width, view.height); " />
</Listeners>
</ext:Window>
</form>


... something moves

Matteo

Timothy
Oct 02, 2008, 11:35 PM
Great recommendation, love it.  Only works with 0.7.0 SVN.

Cheers,
Timothy