Thank you for your post.
The size of the layout will not change when rotating the device from Landscape to Portrait. Instead, use the script trigger OnLayoutSizeChange in conjunction with the function Get (WindowOrientation). The OnLayoutSizeChange will trigger when switching between Portrait and Landscape, and then within the script, use the Get (WindowOrientation) function to determine if the device is in Portrait or Landscape, and then act accordingly. You may want to keep two instances of the layout and switch between the layouts when rotating the device.
Let me know if you need additional clarification.
You can also place an object in the lower right corner of the layout and change the auto-size anchors from "Top and Left" to "Bottom and Right".
For simple layouts where I don't need to use the trigger to flip between layouts, I'll size the layout to fit the intersection of the landscape and horizontal orientation stencils with such a "resize object" located as described. I then make the object invisible by entering True into the "Hide Object When" setting for that layout object.
I can also set objects to "slide" out from behind other opaque objects that hide them as a way to get a layout to adjust to orientation. And portals and other objects can be set to "Stretch" to a taller height with more rows when the device orients to portrait by setting both top and bottom auto-size anchors.
So I don't always set up two layouts for every iOS layout in my system.
TSGal - The two layout solution is kind of what i figured, but since everything else on the layout with anchors resizes on orientation changes I thought maybe I was missing something as far as the background was concerned. Thanks!
PhilModJunk - This all works, and thanks for the advice. I was referring to the 'Layout Background' specifically, which has no anchor controls.
I was referring to the 'Layout Background' specifically, which has no anchor controls.
Which is why you place an invisible layout object on your layout with the anchors that I described. When you rotate the device, those anchors will pull that object down or to the right and force the layout to resize with it.
Do you have a file anywhere with an example of this working? As you can see from my example file I have an object that resizes just fine when orientation changes and the footer slides down as well, but the Layout Background which is not tied to any layout part stays the same size. I know that i could just fill the various layout parts with images and resize, but then I would not get the one unified image in the background behind all the parts. I think there is no workaround for this other than having two layouts like TSGal said.
but then I would not get the one unified image in the background behind all the parts.
What unified image?
Have you placed a graphic object in the background or specified a fill color for the layout background? (As opposed to specifying fill colors for the layout parts...)
Check my example file or this link if you are confused by my reference to the Layout Background. Again I appreciate your suggestions, they just don't work for this particular issue as I am looking for ways to make the Layout Background specifically resize on orientation change. I think the suggestion of TSGal to create two versions of the layout is my only recourse.
I am aware that the layout background is a separate part of the layout structure and that this is a pretty new aspect of what we can directly access in FileMaker. But much of what we might put into the layout background can be handled by putting it into the layout parts.
In your image files, I see a solid color in the background that fails to extend when the window resizes due to the orientation change. But if you specified the same fill color for the Header, body and footer layout parts, this would not be an issue.
It's not a solid color in the background, it's an image. I should have picked a better one to illustrate that more clearly. Your solution will not fix this issue. Thank you for your persistence but i will have to create two layouts.
That's the way it has to be done with FMGo. If it can't be solved with layout-parts -> create two (or more) separate layouts and use the new trigger.
I'm happy that the layout-parts won't 'slide' - there are FMGo App's that need a fixed layout 'frame', especially when creating 'Kiosk'-App's that must NOT resize (-:
I have yet to find a good example of using OnLayoutSizeChange for web-direct solutions. And FM excluded any Web Direct solutions in the FM 15 Training series. If anyone knows of a good example of using this method to deliver proportionately sized layouts in webdirect. PLEASE HELP...