Estimated Time To Read This: 4 – 7 minutes
In previous versions of FileMaker Pro, when you placed an object on a layout; the object’s size and position was static – even if the user increased/decreased the size of the window, the object would remain exactly the same. FileMaker Pro 9 has introduced the ability to resize objects automatically when the user resizes a window. This allows you to add objects that grow to fill in the available space, or move right or down as the user increases the width or height of the window.
In order to set an object to resize, View Object Info needs to be on (in the View menu, Object Info should be selected). At the bottom of the info box, there are four checkboxes; each of the checkboxes anchors one side of the object; this means that it will remain the same distance from the edge of the window. Note: objects that are in Portals or Tab controls will be anchored to the Portal or Tab Control that they are in, not to the window, so they will only resize if the Portal or Tab they are in changes size.
By default, an object is anchored on the Left and Top, which mimics the behaviour of previous FileMaker versions (the object remains in the same position and the same size, no matter what the size of the window is). However, checking and un-checking the anchors in various combinations gives different results – objects can increase in width and height or even move to the right or down (or both) as the window changes size.
As an example, here is a footer area that appears at the bottom of a contact layout (with navigation buttons, add/delete buttons, record count, etc). The window has been adjusted, so that there is white space to the right and below the footer.
By turning on the anchor for the right edge of the footer background, the footer will expand to the fill screen horizontally.
While the background has expanded to the right, there is still white space at the bottom of the screen. Turning on the bottom anchor for the footer’s background will cause it to expand downward, but turning off the top anchor as well will cause it to move down.
The background has moved down, but the buttons and the text haven’t. Turning on the bottom anchor and turning off the top anchor on all these objects will correct this.
Finally, the copyright text and the buttons haven’t moved to the right either, this can be done by turning on the right anchor and turning off the left anchor for these objects. Note: if both the left and right or both the top and bottom anchors are off, then the object will remain a constant distance from the centre of the layout.
Looking at the rest of the layout, the same techniques can be applied. Notice that the portal in the Contact Log section added two rows to the bottom when it was set to resize. This occurred because the fields in the portal were anchored to the top; if any of them were anchored to the bottom, then the rows would expand, but the number of rows would remain constant.
One of the limitations of this feature is that while objects can be set to grow, they will not shrink below the size that they were created with; so if the user decreases the width or height of the window, the width/height of the objects in the window will not decrease below their original width/height.
The auto resize functionality gives the developer more flexibility when creating a layout; if they need to build a solution for users at multiple resolutions, they can design the layout for the smallest resolution, then set the anchors on the objects so that they grow or move appropriately for users at a larger resolution. However, it isn’t a solution for every layout; it would be difficult to use this feature on complicated layouts with objects of varying widths and heights. In the layout above a decision had to be made to expand the right column instead of the left, as expanding both could cause them to overlap.












