7 Replies Latest reply on Mar 23, 2011 9:39 AM by philmodjunk

    Can I use FM to Create This Dynamic Layout?



      Can I use FM to Create This Dynamic Layout?


      I am trying to create a layout with overlapping image conatiners and text fields. I have one container at the bottom of the layer stack for the layout's background image and fills the entire layout. I want to drop in a fancy bordered box onto the background, but I want the area of the box to expand based on the size of what is inside of it. I have attached a picture of an example of an example of what I mean showing 3 resizes.

      I'm wondering if this type of dynamic layout can be created in Filemaker and how to go about it. I tried slicing up my border box into pieces and then apply sliding to them, but I am not able to get the result I want. I think I could manipluate the layout objects if I could set the fieldBounds via a script or calculation, but all I am finding in the funtion reference is that I am able to get the fieldBounds but not set them.

      Any help would be appreciated.


        • 1. Re: Can I use FM to Create This Dynamic Layout?

          As you've discovered, FileMaker provides no way to programmatically resize layout objects.

          You could probably get the effect you want using the Web Viewer (or multiple Web Viewers).

          • 2. Re: Can I use FM to Create This Dynamic Layout?

            Or if you really want to get into it, you could set up repeating container fields; break your graphic into top, middle, and bottom pieces; and then calculate how many repetitions to fill with middle pieces, and what rep to put the bottom piece in.

            • 3. Re: Can I use FM to Create This Dynamic Layout?

              While you never know what a plug in developer might dream up, I don't think there's anyway you can get the last example to work.

              The first two examples are possible, but wrapping the text around a container field that might or might not contain an image isn't something you could automate. Best you could do is to use a separate layout where you'd manually edit text in two or more fields to get the look you show here.

              To get sliding to work for the first example:

              1. Slice the "fancy frame" into 3 parts. Put an image of the top, curved section in the header. Put an image of the bottom curved section in the footer.
              2. Position a rectangular field sized like the middle image in the body, positioned to bridge the gap between the top and bottom portions of the "frame".
              3. Use the Inspector's Position tab to set this field to "slide up, resize enclosing part".

              Best compromise I can think of for the 3rd situation is to have thee fields, one container and two text fields set to slide up/resize. Getting the text to flow from the first text field to the second, would, however, require manual editing.

              Key facts about sliding:

              1. It's only visible in preview mode and when you print/save as PDF...
              2. All layout objects, in the body, below a slide/resize field need to also be set to slide up and resize.
              3. Only objects in the body will slide.
              4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
              5. Consistent side borders are difficult to achieve with sliding fields.

              • 4. Re: Can I use FM to Create This Dynamic Layout?

                Thanks for that suggestion about using the header and footer as a workaround. But I don't think it will work as that will change the size of my layout depending on how large the middle section is resized to.

                As for the repeating container fields, I'm not sure how that works exactly but I'll look it up and get an idea.

                I should have posted these two cases instead of the three I put up before. I actually will not be working with text in the middle area, only images of a set width and variable height. As I hope is clear, I want to keep the layout at letter size overall, no matter the size of the variable image container.

                • 5. Re: Can I use FM to Create This Dynamic Layout?

                  I did not suggest repeating container fields. I don't see any way such a set up would help do this.

                  I should have said to put the bottom frame in a trailing grand summary as putting it in the footer would not work. I don't follow the part about the sliding changing the layout size. Sliding only affects how it fits on the page when you print or preview. If you do not want the empty space removed when the field slide up, do not specify the resize option. The bottom of the frame will then slide up, leaving the bottom portion of the page empty.

                  • 6. Re: Can I use FM to Create This Dynamic Layout?

                    I still think a web viewer is the way to do this, but I whipped up a crude example of what I was talking about:


                    • 7. Re: Can I use FM to Create This Dynamic Layout?

                      My last answer was not quite correct. You must use the resizing option, but you can use a sub summary part to contain the bottom of the "frame" and set it to force a new page after every occurrence. Set the sub summary part's "sorted by" field to be field with unique values such as a serial number field and then sort your records (even if there's only one) by this field.