Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to predict the size of a label.caption in pixel?
Message
De
11/12/1999 18:52:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00302272
Message ID:
00302304
Vues:
24
>On my form, I have some captions.
>They are right-justified and their size is not fix.
>In the init of my form, I am loading the labels.captions
>
>Since the labels are right-justified, the new content of the labels is all screw up.
>I figure out that I could calculate the needed right position of the labels if I only knew how long is the current content and how long would be the new content in pixel. Is there a way to predict this according to the string, the size and the font ?
>
>
>Thanks
>eric

You may better set Label.AutoSize=.T. and check Label.Width property after each changing of its caption. Then, if necessary, you may adjust Label.Left property and/or layout properties of other control to make enough room, i.e. it will be done in run-time.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform