Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Detect text wrapping


Mariano Peterson

Recommended Posts

Has anybody figured out a way to tell if the contents of a field are so long that it causes the text to line-wrap within the display?

 

My real goal is to display an ellipses (sp?) if the text within a field is so long that it wraps to multiple lines within the diplay field. The purpose is to alert user that there is hidden text when a display field is only tall enough to show the first line.

 

I don't think using patterncount to check for ¶ would work, because the text will not explicitly have any carriage returns; rather, the software will word-wrap the text, adding "soft returns"(?).

 

Anyway, I'd love to hear any ideas that may be floating around. Thanks!

Link to comment
Share on other sites

I guess you can check the number of characters and then do the LEFT & "..." calc field.

That will work with Courier and other monospaced fonts.

With proportional font it should ideally count the number of iii and mmm and set the length after more complex calculation.

Link to comment
Share on other sites

Hi Mariano,

 

After you determine the length needed for this display field, you might consider placing the calc field over your regular field (make them the same size and format) and turn off 'Allow Entry' on the calc. smile.gif

 

It will display the calc but if a User clicks on the field, it can still be modified. Calc might be:

 

Left(YourField, NumberOfCharacters) & "~"

 

LaRetta

Link to comment
Share on other sites

Thanks, nice method. Unfortunately, the problem I'm having is with determining how many characters are displayed before the text wraps. I'm not using courier (what are the other monospace fonts?) and therefore can't figure out how to consistently determine if the text length will wrap or not.

 

Thanks everybody for your advice. So, what are the other standard/common monospace fonts on Windows?

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use