FormattedHeight of a field and its contents
paul at researchware.com
Thu Feb 1 10:46:22 EST 2018
What version of LiveCode on what platform are you trying this on?
There have been a number of bugs related to object geometry
calculations, including fields, over the years, found and fixed in
various releases of LC. Some were platform and version of OS specific.
On 1/31/2018 8:31 PM, David Epstein via use-livecode wrote:
> Is there somewhere an explanation of how a field’s textSize, borderWidth, margins, and formattedHeight interact?
> According to the dictionary entry for “formattedHeight”, a field’s formattedHeight is calculated “including top and bottom margins”, while the formattedHeight of a chunk is calculated “disregarding margins.”
> That does not seem consistent with these results for a field whose textSize is 16 and whose margin is 4:
> the formattedHeight of line 1 of fld 1 19
> the formattedHeight of line 1 to 2 of fld 1 38
> the formattedHeight of fld 1 15 if there’s one line of text
> the formattedHeight of fld 1 34 if there are two lines of text.
> Even though there are top and bottom margins of 4, the field’s formattedHeight is smaller, rather than larger, than the formattedHeight of its contents.
> A perhaps related question: Why does a field margin of zero clip the visible text at the top and left?
> Many thanks.
> David Epstein
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode