BR: Hmm I figured that  a repeat loop would do that, but was look for a 

                According to the "laws  of math" (ha... has been 
such a long time; I could be wrong) if you have single unknown variable , X, 
and all others are known factors, you would, in theory, be able to work out X 
"in one go."
                The [number of characters, in a given font size/face, that can 
fit on one line of the field with a given length] is, in theory,  among "what 
can be the known"

                These little repeat loops are costly on mobile....

Paul wrote:
        your essentially want a repeat loop where you reduce the textSize of 
char 1 to -1 of the field until the formattedHeight of the field is less 
than or equal to the height of the field

You probably will need a condition in the loop to prevent the textSize 
from going below 9

BR question
        Assuming one is not putting whole pages into small fields, does any one 
have an efficient run time LC algorithm that will set the font size so that the 
formatted text will all appear in the field without needing to scroll?


use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to