1 Reply Latest reply on Nov 10, 2013 8:44 AM by philmodjunk

    Shrinking When Running Script


      Shrinking When Running Script


           Hello FM Devs :D

           When i click on the button to run my script to open my second layout in a window mode(popup window), the first layout i have open Shrinks in size...
           How can i keep the first layout Maximized 
           Here is my script:
           Set Error Capture [ON]
           Allow User About [Off]
           Set Variable [$$Windows_Name:Get (WindowName)] 
           New Window [Name: "Choix De Cartes"; Height: 190; Width: 370; Top: 100; Style: Document]
           Allow Users Abort [Off]
           Show/Hide Toolbars [Lock; Hide]
           Go to Layout["Cartes" (Print)]
           Adjust Window [Resize to Fit]
           Is there a way to force a layout to never shrink and to stay maximized, because i still want my script to resize the second layout, but keeping to first one full size no matter what... ?
           -Dave G.

        • 1. Re: Shrinking When Running Script

               This does not appear to be a question for the FM GO forum section. It should have been posted in the FM PRO Forum.

               This is an issue unique to FileMaker Pro on the Windows platform. It's not an issue on Mac systems nor on iOS devices using FileMaker Go. Windows Maximized, maximizes all windows not just some windows so when New Window is used to open a new window all windows are taken out of maximized state and the last specified window dimensions and position is applied to each.

               This can produce very undesirable window size and position changes.

               There are two different ways to deal with this issue:

               1) Don't maximize your windows. If windows aren't maximized, you won't see a window size change when you open a new window.

               2) Add script that uses the move/re-size script step to re-size the original window after you open the new windw. There are get functions that return the width and height of your current computer's screen that you can use to produce width and height values such that the window resizes out to the largest possible size to fit the FileMaker application window. This does not eliminate the size change, it just minimizes it.

               Then, when you close the smaller window, you should then use another script to re-maximize windows. The same button that closes the smaller window can also maximize windows by performing a script to do both.