Displaying a table

Sarah Reichelt sarahr at genesearch.com.au
Mon Jan 14 18:13:09 EST 2002


Thanks Geoff, that's a much neater answer. I hadn't discovered the
"formattedText" yet.

Sarah

> 
> At 10:22 AM +1000 1/14/02, Sarah Reichelt wrote:
>> on checkSize theString
>> put theString into fld "Format Check"
>> repeat while the formattedWidth of fld "Format Check" > the width of fld
>> "Format Check"
>> delete last char of theString
>> end repeat
>> 
>> return theString
>> end checkSize
> 
> You can simplify this, and speed it up a bit, with the following:
> 
> function truncateToFit theString
> put the string into fld "Format Check"
> return (line 1 of the formattedText of fld "Format Check")
> end truncateToFit




More information about the use-livecode mailing list