Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating widths and heights of strings
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Calculating widths and heights of strings
Divers
Thread ID:
01072336
Message ID:
01072336
Vues:
50
I'm creating a form programatically and want to calculate the correct values for width and height. Up to now I've been approximating with:

replace width with 70*(fontsize*(LEN(expr)) )

As an example, I have a label with a value of "Length of time in this position", Font:Arial Narrow - 8 point - I make the width to be 18480, but if I open the form in Designer it gets changed to 12291.667

The value of FONTMETRIC(7,'Arial Narrow',8) is 13 pixels, the length of the string is 31.

How do I use these values to get 12291.667?

The other thing is that the height that I create for the label string is too small, and on the screen it appears to truncate descending characters, yet when I print the form it's ok.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform