Window Centering Issues

1 posts, 0 answers
  1. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 11 Oct 2007 Link to this post

    This is my scenario:

    Splitter consisting of two horizontal panes.  The top pane is used for navigation (about 60 pixels high) and the bottom is used for content.  The bottom pane opens the windows, which are always modal and don't have a visible status bar.

    When a window is opened, it is centered horizontally, but it is slightly off vertically.  So I've created a "nudge" function which nudges the window up about 30 pixels - which appears to be about the amount that the window is off by.  Seems to work quite well so far.

    function get_RadWindow() {   
      var oWindow = null;   
      if (window.radWindow) {   
        oWindow = window.radWindow;   
      else if (window.frameElement.radWindow) {  
        oWindow = window.frameElement.radWindow;   
      return oWindow;  
    function nudgeWindow(x,y) {   
      var oWnd = get_RadWindow();   
      var bounds = oWnd.getWindowBounds();   
      var t = bounds.y;   
      var l = bounds.x;   
      oWnd.moveTo(l + x, t + y);  

    Hope that helps somebody else.
Back to Top