bobsneidar at iotecdigital.com
Mon Oct 26 13:17:03 EDT 2020
I have a field on one of my apps whose width needs to change depending on content, but there is a minimum and a maximum width aspect, so that an empty field doesn’t appear like a weird tiny rectangle or stretch to overlap other objects.
I use something like:
if the formattedWidth of field x < tMinWidth then set the width of field x to tMinWidth
else if the formattedWidth of field x > tMaxWidth then set the width of field x to tMaxWidth
else set the width of field x to the formattedWidth of field x
> On Oct 24, 2020, at 3:35 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi Richmond,
>> Am 24.10.2020 um 12:17 schrieb Richmond via use-livecode <use-livecode at lists.runrev.com>:
>> Over in the Forums someone has asked a question about measuring the length of text lines.
>> Of course one can count characters, but in most alphabetic systems different characters have different lengths.
>> Is there a way to measure the length as in LENGTH of a line rather than count the number of characters it
> put the formattedwidth of line 1 of fld 1
> Klaus Major
> klaus at major-k.de
> 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