The script step "Adjust Window" - Specify "Resize to Fit" will do this. If you navigate via buttons, you can add that to your existing script. If you navigate via FileMaker's native Layout drop down, you'll need to create a script and set a script trigger OnLayoutEnter.
The script you create can simply be one line - Adjust Window: Resize to Fit.
Okay, but when I Maximize the windows it doesn't fit all the space because the body of the layout is 480 pt tall.
On your Form layout, go into layout mode. From the view menu select "Inspector" (if not already checked). On the inspector's property tab is a section called "Autosizing". Select an object on your layout, and check the anchor points to determine how it autosize behaves for that object(s).
For more info:
Use the anchoring features in the Inspector to expand the objects on the layout. They're located under "Autosizing" in the Position tab.
If it's your first time using this feature, you'll have to experiment with it to avoid certain unpleasantries (such as overlap or objects jumping out of position). You'll get the hang of it pretty quickly.
Are you on Mac or Windows? Application windows are rendered differently. Also, could you attach a screenshot for clarification?
for this solution I'm on Windows.
I attach three picture: the first is about the customers list, the second show the window with wrong space on the bottom and the third show the right bottom of the windo, but the field enlarged to accomodate it.
Image 1: Customers list
Image 2: Wrong bottom of window, but correct fields height:
Image 3: Correct bottom of window, but wrong field height:
I would like to have fields like the second image and bottom of he window like the third image!!!
In Form View, FileMaker will leave the Body part at the size you specify in Layout mode unless anchoring tells it otherwise. So you need either to make the layout bigger (which may cause scroll bars to appear if the user shrinks the window), or you need to use anchoring. If you don't want the field to expand, you can do this:
Make a line underneath your field. Change the anchoring on the field back to left / top. Anchor the line to bottom only. Make the line have zero thickness so it doesn't show up.
This will create the effect you're after.
Thanks lonewolf. The images help. Follow Mike's instructions on how to get what you're after.
You only need one item to resize the layout and that can be one of several objects. For instance a line of text in the footer dragged the wide of the current layout and sized for right, left and bottom anchors will resize the layout to full screen even if the layout originaly was only 320 x 240.
The other objects are a different story. They can be sized to expand, center, alight right or align left, top or bottom. Lots of fun here trying to figure it all out.
Start with a small iPhone size layout and draw a box within it. Set the anchors of the box to all of the options. Enter browse mode. Now when you resize the window the box will expand just as you asked. The rest is fun time.