put ext:Window in center of the screen

  1. #1

    put ext:Window in center of the screen

    I want to put ext:Window control in the center of the screen. I want to know how to do it. ext:Window control has X,Y attributes to position the window. but user can resize the web site so the ext:Window not in the center. I wants the window allways in the center even the user resize the page.

    Thanks
  2. #2
    Hello!

    Look at the following sample:

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
                <Listeners>
                    <WindowResize Handler="#{MyWindow}.center()" />
                </Listeners>
            </ext:ResourceManager>
    
            <ext:Window runat="server" Title="My Window" Html="Some Html Here" ID="MyWindow">
            </ext:Window>
        </form>    
    </body>
    </html>
  3. #3

    Thanks. WindowResize Handler works

    WindowResize Handler works

Similar Threads

  1. [CLOSED] how to set tabpanel align center in the screen
    By hdsoso in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 06, 2013, 11:22 AM
  2. Replies: 2
    Last Post: Jun 23, 2012, 2:17 PM
  3. Replies: 5
    Last Post: Nov 14, 2011, 9:28 AM
  4. Windows always on the center of screen
    By reiben in forum 1.x Help
    Replies: 1
    Last Post: Dec 09, 2010, 11:56 AM
  5. [CLOSED] Center windown on screen, not absolute
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 25, 2010, 10:12 PM

Posting Permissions