Page 1 of 1

Apparent rather than literal line count

Posted: Wed Sep 21, 2016 5:02 pm
by thatkeith
Is there a way to find out how many wrapped lines there are in a field? Not the logical lines (return-delimited), but the way the text looks to a human when it line-wraps in a text field.
I'd like to be able to work out, programmatically, how much height a given chunk of text takes when it's in a particular font, type size and line height.

k

Re: Apparent rather than literal line count

Posted: Wed Sep 21, 2016 5:23 pm
by Klaus
Hi Keith,

do something like this:
...
put the number of lines of THE FORMATTEDTEXT of fld "your field here"
...

Best

Klaus

Re: Apparent rather than literal line count

Posted: Wed Sep 21, 2016 6:07 pm
by thatkeith
That's brilliant! Thanks Klaus – I had a vague memory of there being some solution but I didn't manage to track it down in the dictionary. (I have to say I still really dislike the new-look LC dictionary. :( )