JenniSTM Posted November 6, 2023 Posted November 6, 2023 Hullo everyone! I'm using FM Pro 18 Advanced. I'm wondering if there's a way to format a field so that, should the content be longer than the field allows, the font is reduced until it is all visible. Basically, we have a couple of suppliers with extra- long product codes & at the moment they get cut off. (Increasing the field size takes away from the next field - which could also occasionally use this format...) Here's hoping! 🤞
comment Posted November 6, 2023 Posted November 6, 2023 (edited) There is no way to format the field to do this automatically on its own. You could use conditional formatting or an auto-entered calculation to reduce the font size based on the number of characters in the field. However, unless the field is formatted to display in monospaced font, such adjustment can only be an approximation. A more elaborate (much more elaborate) method would use a looping script to reduce the font gradually until the field stops expanding when entered into. You can check this by comparing the results of GetLayoutObjectAttribute ( "fieldObject" ; "bottom" ) in between the two states (I am sure I posted a demo of this somewhere, but I cannot find it now). Note that reducing the actual font size of the text (as opposed to conditional formatting) will affect the way the text is displayed in every other instance of the field, on any layout - so I would be very hesitant to go that way. Not to mention that this would make a very poor graphic design (unless you are producing name badges or something like that). What is this layout used for? If it's for printing, you could simply make the field big enough to accommodate the largest possible value and close the gap to the next field by shrinking and sliding: https://help.claris.com/en/pro-help/content/removing-blank-spaces.html If it's not for printing, then why not simply move the next field to make room? Edited November 6, 2023 by comment
Recommended Posts
This topic is 381 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 accountSign in
Already have an account? Sign in here.
Sign In Now