Jul 28, 2008, 4:26 PM
ext:Window position
I have an ext:Window on my page, which is not displayed on PageLoad and a bunch of user controls with buttons. When a button in user control is clicked, an iframe inside the window is updated client-side and the window is displayed (modal). Everything works fine when the page is not scrolled down. When the page is scrolled down and a button is clicked on any of the bottom user controls, I have to scroll up to see the window.
Is there anyway to make the Ext:Window show up in the centre of the screen, regardless of the scroll position (e.g. like Ext.Confirm -- it is always displayed in the centre)?
I believe the problem is that the window already exists and it's just being hidden/shown, but it doesn't know that the document scrolled down. So the question is: how do I tell the window what the new "center" is? My guess would be to create a BeforeShow listener for the window, but what do I set in the listener?
Thank you!