[CLOSED] Center window on window resize

  1. #1

    [CLOSED] Center window on window resize

    I would like to center my login window when the screen is resized. Problem here is that the scriptmanager is located in the master page. How can I fix this?
  2. #2

    RE: [CLOSED] Center window on window resize

    Hi,

    You need use ScriptManagerProxy

    <asp:Content ContentPlaceHolderID="cphTemplate" ID="conLogin" runat="server">
       <ext:ScriptManagerProxy runat="server">
            <Listeners>
                <WindowResize Handler="if(#{LoginWindow}.isVisible()){#{LoginWindow}.center();}" />
            </Listeners>
       </ext:ScriptManagerProxy>
       
       <ext:Window ID="LoginWindow" runat="server" Title="Login">
       </ext:Window>
    </asp:Content>
  3. #3

    RE: [CLOSED] Center window on window resize

    Thanks man, you're awesome !!!
  4. #4

    RE: [CLOSED] Center window on window resize

    if your window tag is inside a form tag than this does not center correctly--it'll hide half of the window at the top.
  5. #5

    RE: [CLOSED] Center window on window resize

    nevermind: put the window inside a viewport and it'll work!!
  6. #6

    RE: [CLOSED] Center window on window resize

    Problem in IE7: When the page is loaded, the window resize event is fired , even before my JS is loaded. Any suggestions ? I suggest that modify the event so it can't be fired until the whole page is loaded.

Similar Threads

  1. [CLOSED] Center window to Panel or Grid
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 26, 2012, 10:39 PM
  2. Replies: 2
    Last Post: Jun 23, 2012, 2:17 PM
  3. [CLOSED] BUG when resize window
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 30, 2010, 8:15 AM
  4. [CLOSED] [1.0] Center ext:window
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 24, 2010, 2:57 PM
  5. Center ext:window on window resizing
    By matteo in forum Examples and Extras
    Replies: 1
    Last Post: Oct 02, 2008, 11:35 PM

Posting Permissions