Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3949 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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!

Posted

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?

Posted

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.

Posted

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!

Posted

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.

Posted

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).

This topic is 3949 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.