Center ext:window on window resizing

  1. #1

    Center ext:window on window resizing

    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
  2. #2

    RE: Center ext:window on window resizing

    Great recommendation, love it. Only works with 0.7.0 SVN.

    Cheers,
    Timothy

Similar Threads

  1. Replies: 2
    Last Post: Jun 23, 2012, 3:17 PM
  2. [CLOSED] Displaying Error After Resizing the window
    By imaa in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 27, 2011, 10:38 AM
  3. Replies: 2
    Last Post: Oct 14, 2010, 11:05 AM
  4. resizing panel to 100% of Ext.Window
    By principal_X in forum 1.x Help
    Replies: 2
    Last Post: Jun 09, 2009, 4:30 PM
  5. [CLOSED] Center window on window resize
    By CSG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 29, 2009, 6:05 AM

Posting Permissions