Any ideas on working out number of characters(approx) that can be entered into a field

J. Landman Gay jacque at hyperactivesw.com
Mon Aug 26 12:07:48 EDT 2013


On 8/26/13 1:37 AM, planix wrote:
> Hi All,
>
> I am looking for ways to determine the approximate number of characters that
> will fit into a text field of fixed height and width.
>
> I am guessing there is some way of doing this by working with the line
> height, font size, and the height and width of the field. Anyone ever had a
> need to do this? Or is there an obvious way?

It used to be hard to do this, but now we have a function that will tell 
you exactly what you need, thanks to Jan Schenkel's contribution to the 
engine. See the "pageRanges" property in the dictionary. It gives a list 
of character ranges that fit the height of the field.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list