6 Replies Latest reply on Feb 18, 2017 10:27 AM by philmodjunk

    Window adjustment script

    projay

      FM 15adv

      Hello everyone, I have been using this script to adjust my window centered on my display it works but it seems to produce white screens initially.

      Let me know your thoughts if this is as good as it gets or are there better solutions for sizing and centering the display window. Thanks -J

       

        • 1. Re: Window adjustment script
          projay

          Bump

          • 2. Re: Window adjustment script
            philmodjunk

            I would not use the Adjust WIndow as the first step.

             

            I'd create the window using negative values to position the new window way off the edge of the window so that no part of the window is visible. I'd then calculate the desired width, height and position first, before using a single Move/resize step to position and size the window where I want it.

            • 3. Re: Window adjustment script
              siplus

              IMHO Freeze window should be the first line of any script having to do with windows, and refresh window the last.

               

              Offscreen windows, when used on Windows OS's, give problems (but it seems that the next FM version will deal with that).

              • 4. Re: Window adjustment script
                philmodjunk

                Freeze window isn't much use when it's the window itself that you are manipulating. And if your solution does not work with windows maximized, creating windows off screen works just fine for me in windows. Use this method frequently with no trouble.

                 

                The think is that this script manipulates window size and position several times instead of just once and you can get a "flash" from each one.

                • 5. Re: Window adjustment script
                  projay

                  So is this script doing too much....that's not necessary?

                   

                  All I need is to be able to resize and center a smaller display window. 

                   

                  -J

                  • 6. Re: Window adjustment script
                    philmodjunk

                    So why not calculate all the values for window size and position in your variables. Then use new window to open the window, using your variables to specify size and position that one time?

                     

                    In an older, pre-popover version of FileMaker, I set up my own "custom dialog" system that worked exactly this way so that I could work around the limitations of custom dialogs.