8 Replies Latest reply on Jun 18, 2017 9:49 AM by AndreasvanHaren

    Can text fields set to have a maximum size?

    AndreasvanHaren

      I am working on adjusting the anchor points for text fields so that when the window is being resized, those fields will be stretched as well to fit the window. This is easy to do when there is only 1 text field, but when there are 2 text fields, they start to overlap each other. I tried all different combinations of anchoring the top, bottom, left and right side of the fields, but I cannot find a good combination that will equally stretch the 2 fields, keep the left field connected to the left side of the window and the right field to the right side of the window without that the text fields overlap. Any suggestions?

        • 1. Re: Can text fields set to have a maximum size?
          bigtom

          Did you try grouping the fields into one object?

          • 2. Re: Can text fields set to have a maximum size?
            AndreasvanHaren

            Yes, I tried that as well. In these screenshots I have 3 text fields each with their own label. All of them are grouped together in a single group, But I also tried it by grouping label and a single field creating 3 groups that way, still everything is overlapping when increasing the window size by dragging it as you can see in the last screenshot. Maybe I should set a maximum vertical size for every box instead that cannot get passed. Is that possible? I could not find an option to set a maximum field sizes.

             

            Screen Shot 2017-06-18 at 17.01.26.png  Screen Shot 2017-06-18 at 16.59.47.png  Screen Shot 2017-06-18 at 16.59.22.png

            • 3. Re: Can text fields set to have a maximum size?
              bigtom

              I think the only things that resize the way you want are repeating fields and button bars. Might be a good feature request fro the ideas section.

              • 4. Re: Can text fields set to have a maximum size?
                AndreasvanHaren

                But in case of using a repeated field, those fields still acts as a single field, right? In my case all those 3 fields need to story different info.

                • 5. Re: Can text fields set to have a maximum size?
                  bigtom

                  Yeah. I tried to play with two repeating fields and a button bar layered but that did not work. Might not be a way to do what you are looking with fields directly on the layout. Have you considered a web viewer. Might be easier that way.

                  • 6. Re: Can text fields set to have a maximum size?
                    gofmp15

                    My experience is that if I set several fields to have left and right anchors and they are next to each other horizontaly, they will overlap. Use both anchors only on the rightmost field.

                     

                    The same thing happens with vertical fields. Anchor only the bottom most.

                     

                    This is why scroll bars were invented... 

                     

                    FileMaker can't make its own dialog expand both fields as in the various editors we use. FileMaker management probably saved $50 by not having this feature implemented.

                     

                    An idea is to use Preview Mode.

                     

                    Expand your vertical layout and the fields to their maximum height. Apply the option in the Inspector under the ruler tab to slide objects up. Unfortunately you have to be in Preview mode for the text fields to resize.

                     

                    A better option might be to use a variable to display the field and doesn't require preview mode.

                     

                    For instance

                    Place on your layout

                    <<FieldA>>

                    <<FieldB>>

                    <<FieldC>>

                     

                    and these should expand to fit the contents. You will need to expand the length of the layout...

                     

                    You could also script setting the fields into a variable

                    Set $$Variable to

                    Field A & PP & Field B & PP & Field C  (PP=Pilcrow)

                     

                    Now put $$Variable as a text object on your layout. You could also include text in the calculation to indicate field name.

                     

                    $$Variable will epand and contract to display its content.

                     

                    AND....drumroll...

                     

                    Add a calculated field to your layout to contain:

                    Field A & PP & Field B & PP & Field C  (PP=Pilcrow) and any manual text such as field name

                     

                    Place the calculated field on your layout as a regular field with the anchors.

                    • 7. Re: Can text fields set to have a maximum size?
                      philmodjunk

                      Yes, this is a known limitation of resize anchors. It's rather frustrating, especially since, when in layout mode, you can group a set of objects and resize them as a group. Thus it seems that FileMaker already has the needed algorithm for a group of objects to resize as a group in a different context that just needs to also be applied to resize anchors.

                       

                      The options are:

                       

                      1) set one object in a row/column to "stretch" as the row/column size increases with the window size. Objects to the right/below the object should have right/bottom anchors selected but not the opposite anchor so that they slide with the right/bottom window edge. Objects to the left/above should have their default anchors set so that they do not change with the window.

                       

                      2) remove all anchors. With all anchors removed, the objects stay centered in the window and the open space around all sides increases with the window side. You then can make further adjustments by zooming the window and/or setting the "enlarge window contents" to improve visibility preference (Windows).

                      • 8. Re: Can text fields set to have a maximum size?
                        AndreasvanHaren

                        Yes, I think the best option is to keep them centered in the window, the fields sizes will not increase but that's a better situation than when they start to overlap. Thanks.