January 28, 201411 yr Hello Board! Can i get some guidance, point me in the right direction? I have some labels printing out filled with text fields and a Calc field. It works OK. What I'd like to do is resize the Text fields dependant on their content. So, for instance, we have a Product::Colour field. Sometimes the content is 'Black'. Sometimes it's 'Black with Grey and a few spots of Maroon' (for instance). I'd like that field to fill the entire width of a label, whether the content is small or large. Is there a way to do that via scripting? Can i also, if that's possible, allow the text to wrap onto another line, perhaps? Or adjust the position of other Text fields if it does wrap to a second line; pushing other lines further down? I've not done any of this sort of intermediate Layout functioning before. If someone can point me in the right direction of where I should be looking, I'll go find out. Many thanks! H
January 28, 201411 yr You can, if you want, merge all or some of your fields into a single text object. I would experiment with that before going to the extreme of manipulating the font size. http://www.filemaker.com/13help/en/html/create_layout.9.27.html#1160797
January 28, 201411 yr Author Hello Comment, thank you for your input. I have scanned it and it doesn't seem to be what i need - but I am sure there is the functionality in there somewhere, thank you!
January 28, 201411 yr it doesn't seem to be what i need Then most likely I have misunderstood what you need.
January 28, 201411 yr Are you using the labels included with the Reports Layout, or are you inventing your own? How about an example of the Before and After that you are wanting? The topic of increasing / decreasing the text size in a field has come up numerous times in the past, have you tried searching for some of the keywords in your question?
January 29, 201411 yr Author I have made my own Layout for the labels. I don't have an after but it may look something like this: Before: Product A Black and Green and Brown with Pink Spots 12345 Product B Black 12346 After: Product A Black and Green and Brown with Pink Spots 12345 Product B Black 12346 Yes, i've tried searching for this information but have not come up with anything that fitted my requirements.
January 30, 201411 yr Author That's a lot better, thanks! But takes me off this site - shame. It seems that it's not possible to do what i'm trying to do, though. One post on the Filemaker site from 2011 relates to automatically resizing fields to length. It says 'This cannot be done in Filemaker'. Thanks for your help with the search, though!
January 30, 201411 yr It says 'This cannot be done in Filemaker' You cannot alter the font setting for a field layout object, but you can change the display size of its contents via Conditional Formatting. In your case, try applying CF to the Colour field along the lines of Formula: Length ( self ) > 15 ; [ select smaller font size ] Formula: Length ( self ) > 25 ; [ select even smaller size ] ; etc.
January 30, 201411 yr One post on the Filemaker site from 2011 relates to automatically resizing fields to length. It says 'This cannot be done in Filemaker'. It depends on what you mean by "automatically resizing fields to length", esp. the "automatically" part. I don't think you are asking about resizing a field, though; it seems to me you are trying to resize the text inside a field - which is a different matter altogether. The main problem here is that with a proportional font, the exact width of a text depends not only on the font size, but also on the text itself. The text "www" is wider than "iii", although both are the same length in terms of character count. So you can either make a rough estimate and hope for the best (as proposed by eos, for example), or devise a laborious process of adjusting the font-size on a trial-and-error basis. This is not only difficult, it also carries a few side-effects that may combine to make the cure worse than the disease. Note also that adjusting the font size works in both dimensions. The field must be tall enough to accommodate the largest allowed font size - and consequently, if that size is not reached, the vertical gap is increased (this is one reason to use merge fields instead).
Create an account or sign in to comment