Locking for an idea to ....

DunbarX at aol.com DunbarX at aol.com
Mon Feb 22 09:25:59 EST 2010


Couldn't you determine the length of the data in your field and set the 
textsize as needed?
Find out how many chars just fit into the field. When you load your data, 
include a little code to change the textSize as required:

on LoadYourData -- your code that puts the address into the field
....
switch
   case   the length of me >= 30 and the length of me < 40 -- or whatever
     set the textSize of me to 10
     break
   case   the length of me >= 40 and the length of me < 50-- or whatever
     set the textSize of me to 9
     break
   case --you get the picture
end switch

 If the data is very long, you might end up reducing the text so much that 
it is hard to read, I guess. 

Can you make the field larger if the data is too long? In the same way, you 
could set the rect of the field as well.

Craig Newman



More information about the use-livecode mailing list