There is a script function to maximize window. There are a number of ways to utilize this feature. the simplest way is to create a "Close Window" script which closes current window and then maximizes current window.
EDIT: the script function is "Adjust Window [Maximize]"
The window goes back to "restored" dimensions if there's more than one window in the FileMaker application window. You can avoid the issue by setting the window to the maximum size without using the Maximize command. Here's a script I use:
Note that you'll probably have to tweak the adjusted size based on your particular installation (window size, OS, toolbars on / off).
Thanks for the fast answer
But I guess, I've to be a little bit more precise...
I normally work with one window (which is maximized). Then change the layouts when needed.
But there is one exception - when I want to print something and go to the page view mode.
Then I open a new window with a print-layout in page view mode. This window is always only around a third of the width of the original window. And stays above the old window.
The problem is, that in the moment I open the new window, the old window is resized (is not longer maximized) and when closing the new window, it stays shrinked. I only manually can resize the window
Thanks for the fast answer
I will try and let you know, whether it has worked...
I tried - and you are right. If not using the "maximize" command, then the (old) window is not resized.
Unfortunately, I then get this super ugly, thick blue Window-Frame, which completely destroys my design.
I can accept that for the time the new window (with the page view-mode) is on top of the screen, but want to bring back the old window (maximized, without the thick blue Window-Frame) to it's original design.
So, unfortunately, this is not the best solution (for me)
Any other idea?
I tried to work with Script-Triggers, but couldn't find a solution
Set a script trigger on your "print-layout" for when layout exit. the Script only needs to read
Adjust Window [Maximize]
Yes. This. Or use OnWindowClose and make it conditional based on the name of the window being closed.
Thanks for the answer
I already had the same idea. Unfortunately, the script trigger is not working, when I close the window.
I used the script-debugger to follow the program. The script trigger on Exit Layout is not triggered.
Hmmm... may be if I use a Button for exit the window in the "print-layout" (blocking the normal windows-close etc. buttons)...
Ok, I try and let you know
I found the problem
The script-trigger works fine - the only problem was, that by default, triggering is disabled in "page-view" mode !!!
(and my "print-layout" is in page view mode hehe...)
Enabling this, the script trigger worked, run the script and I got back my original, maximized window
Thank's to you both !