On Oct 14, 2011, at 10:49 AM, Bob Sneidar wrote:

> There is a property called the formattedHeight. There is also a property for 
> the current scroll, not sure what it is called. Once you know the number of 
> lines you have all the variables sorted. Between them you should get pretty 
> close if not dead on. 

Right - if the point is to reduce the textSize of the lines until it fits the 
height of the field, you can do this:

put the formattedHeight of fld 1 into tFormattedHt
put the number of lines of fld 1 * the textHeight of fld 1 into tCurrHt

repeat until tCurrHt <= tFormattedHt
  if the textSize of fld 1 = 6 then exit repeat  -- don't want to get TOO small
  set the textSize of fld 1 to ((the textSize of fld 1)-1)
  put the number of lines of fld 1 * the textHeight of fld 1 into tCurrHt
end repeat


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/  

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to