2 Replies Latest reply on Apr 13, 2009 6:51 PM by JaySchille

    centering a window on screen

    JaySchille

      Title

      centering a window on screen

      Post

      Surely there must be a script for opening a window centered on the screen, regardless of the size of the the user's monitor. 

        • 1. Re: centering a window on screen
          philmodjunk
            

          Jay Schille wrote:
          Surely there must be a script for opening a window centered on the screen, regardless of the size of the the user's monitor. 

           

          If you want to open a new window WITHIN the Filemaker application window, then your answer is yes. If you want to control the Filemaker Pro application window itself in this manner, then I don't think you can.

           

          Here's a script for centering a new, 300 x 300 pixel window:

           

          New Window [Name: "Window Name"; Height: 300; Width: 300; Top: (Get(ScreenHeight)-300)/2; Left: (Get(ScreenWidth)-300)/2]


          • 2. Re: centering a window on screen
            JaySchille
              

            That's it! I generalized it like so:

            New Window [Name: $WindowName; Height: $Height; Width: $Width; Top: (Get(ScreenHeight)-$Height)/2; Left: (Get(ScreenWidth)-$Width)/2] 

             

            Thank you.