This is a public Forum  publicRSS

Forum post

    FMNewbie
    Auto-Sizing Text BoxesAnswered
    Forum post posted June 19, 2010 by FMNewbie , last edited February 9, 2012
    886 Views, 9 Comments
    Title:
    Auto-Sizing Text Boxes
    Post:

    FM Pro 11; Mac OS

     

    How do you set an object (text box) to automatically re-sized based on the amount of text in it??

     

     

     

    Best Answer

    FMNewbie

    I did everything mentioned above (or at least I thought I did) but it still didn't work.  In the end, I deleted the text boxes from the layout and re-drew new ones... clicked "slide up" and "reduce enclosing part" and voila... it worked fine. 

     

    Still not sure what I was doing wrong before, but thanks anyway for everyone's help. 

     

     

    Answer

     

    • LaRetta

      Is this for a report?  If so, make your text field as large as you will ever need and then set the field (Format > Set Sliding and Printing) to slide up and be sure to check 'also reduce size of enclosing part.'

       

      If this is for a form or list layout, sorry, but you can't.  Clicking into the field will expand it if needed.  You can also turn off entry to the field and attach script to it which opens a window to only the field (with the field taking the entire layout).  Then close window after viewing.

    • FMNewbie

      Hmmm.. okay.  So how would I set it to automatically insert a timestamp when the user clicks in each box in a repeating field??

       

       

       

       

       

       

    • LaRetta

      What are you trying to do?  Repeating fields should normally not be used for User input.  And how is that connected to expanding a text field?

    • FMNewbie

      Sorry... disregard that last question about the timestamp... I had my posts confused.  I guess that's a sign!!  

       

      Anyway, what I'm trying to do is have a text box that will slide and re-size based on the amount of text in it.  I can get this to work if the text box is small but I understand that you have to initially set the text box to be as large as it could ever possibly be which, in this case, is about 2 pages long.  Unfortunately, when I drag the size of the text box to span across 2 pages in my layout, it no longer re-sizes to fit what's in it. 

       

      Maybe I'm going about this wrong... any suggestions?? 

    • hbrendel

      The sliding option for fields is meant for printing purposes, and will only show in Preview Mode.

      I would make two layouts: One for input (screen), the field fits in the window and has a scrollbar. The other layout is for printing, the field can have any measure and has the sliding options enabled.

       

      HTH

       

      Henk

    • FMNewbie

      That's actually exactly what I did, but for some reason in PREVIEW the text boxes aren't sliding.  I've removed the anchoring.. I've put objects beneath the text boxes designed to slide up go make sure the text box shrinks... and as long as the text box is over the line divider, it won't shrink. 

       

      I have the "allow object to break across page boundaries" turned on under Layout Setup, and I even tried selecting and de-selecting the "discard remainder of part before new page" function.  

       

      I'm at a loss... if its a small text box, it shrinks.  If it's across two pages, it won't.  :smileymad:

       

    • PhilModJunk

      I'm guessing that this same text field might be the text field where you wanted to log multilple entries--each marked with a time stamp. If so, breaking up your text field into multiple related records could greatly minimize the need for sliding and thus avoid the issue of "sliding" a field sized to cross the page break line.

       

      FWIW: when I tested a field sized to cross the page break marker, it did slide correctly for me in Filemaker 11.

    • LaRetta

      You must be sure to also check 'reduce enclosing part' or with Inspector 'resize enclosing part.'

    • FMNewbie

      I did everything mentioned above (or at least I thought I did) but it still didn't work.  In the end, I deleted the text boxes from the layout and re-drew new ones... clicked "slide up" and "reduce enclosing part" and voila... it worked fine. 

       

      Still not sure what I was doing wrong before, but thanks anyway for everyone's help.