3 Replies Latest reply on Jul 27, 2010 9:29 AM by philmodjunk

    Auto-resize layout object to fit contents

    crtopher

      Title

      Auto-resize layout object to fit contents

      Post

      Is there a way to have a report object, ie text field, automatically resize depending on the length of its contents in each record? If I have formatted a text object to have a red background, and I make it as wide as the longest surname, then on my report i have text fields with lots of blank red space at the end of most names. I would like to have the object expand and contract as necessary. Thanks

      Chris Richardson

        • 1. Re: Auto-resize layout object to fit contents
          philmodjunk

          You can set them to contract (slide in filemaker terminology), but not to expand. The effect is only visible in preview or when you print/PDF the layout.

          Check out the Sliding and visibility options on the position tab of the Inspector. You can slide a field to the left or up and can set it to resize the enclosing part to eliminate extra blank space in your layout. In most cases you have to set all layout objects to slide in the same manner from the first field you set to slide donward (slide up) or to the right (slide left) to get the desired result.

          • 2. Re: Auto-resize layout object to fit contents
            crtopher

            Thanks Phil

            Another way around it could be this...is there a way to conditionally format the body of a layout record in a report as opposed to certain objects. At the moment i have the weekend days going red (which is leaving me these red text boxes that are often too long for the data...if i could have the background of the body also turn the same red depending on the day of the week this would hide that extra field space.

            • 3. Re: Auto-resize layout object to fit contents
              philmodjunk

              You could place a blank field in the background and format it with the conditional format, leaving the forground fields transparent, but I don't think that will look right whenever the text in the foreground fields extends past the height of the background field. You might be better off changing the color of the text instead of the background.