Jump to content
Server Maintenance This Week. ×

Formatting a text field when it extends past the boundaries


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

Recommended Posts

  • Newbies

Haven't been able to figure out if this is possible - if there is more text than fits within the boundaries of the text box on screen, I'd like to change the background color or give the user some other clue to click on the field and read everything.

Edited by Guest
Link to comment
Share on other sites

Sorry - didn't realise you wanted conditional formatting.

Set up the field with conditional formatting so that above a certain number of words (the number that fit in your field on the layout) the text changes colour or style

Edited by Guest
Link to comment
Share on other sites

Conditional Formatting requires that you exit the field for it to take place.

Since you have 10 Advance, use Script Triggers and a Script.

Use a MonoType Font such as Monaco, and count the number of characters that will fit within your Text Box, I used [color:blue]12 for my example

Your script would look like this;

Set Field [ YourField; Case (Length ( YourField ) ≥ [color:blue]12; TextColor ( YourField ; RGB ( 250 ; 0 ; 0 ) );

TextColor ( YourField ; RGB ( 0 ; 0 ; 0 ) )) ]

and Attach it to the Script Trigger [color:blue]OnObjectModify

Edited by Guest
Link to comment
Share on other sites

Even with a monospaced font, Length() does not provide a reliable indication - you could have a very short text broken into many lines.

There's a demo posted by Daniele somewhere, that shows a question mark peeking behind a field when the text exceeds what is shown - but I believe showing the field contents in a web viewer might be a better solution, if no editing is required.

Link to comment
Share on other sites

This topic is 5349 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.