Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determing form size necessary to display arbitrary text
Message
De
30/10/2001 22:57:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00575284
Message ID:
00575456
Vues:
27
Hi Larry,

Thanks for your help. Your formula looks like it will help me determine the optimal width for a single line text box. But in reviewing your formula and the fontmetric() function, I see no way to specify a specific width in which the specified text will be wrapped so I can determine the height of a word wrapped text string when the width of region has been specified.

Any other suggestions?

Regards,
Malcolm


>>Is there a way to determine the size of a form (window) necessary to display a text string using a specific font given a specific width for the form (window) and assuming that text wrapping is occurring? As an example, given a window 160 pixels in width, how many pixels high must this window be in order to display the string 'Blah blah blah ... blah' using an Arial 10 point font?
>>
>>I understand that there are text metric functions that will tell me the pixel length of a string but my understanding is that these functions do not take into account word wrap, i.e. they only return length assuming a single, non-word wrapped line of text.
>>
>>Any suggestions would be appreciated.
>>
>>Thanks!
>
>Malcolm,
>Check out Message#455966 for a formula to calculate this. You can also check out the other options available with Fontmetric().
>
>HTH.
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform