Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resize control to field size in form designer
Message
 
À
09/12/1999 10:56:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00301020
Message ID:
00301031
Vues:
31
Thanks Neil, but I want to do this in the form designer, not at runtime.

>I use this code to do near enough what you want. I think their are lots of variations on this theme though.
>
>LOCAL loTextBox
>LOCAL lnLength
>LOCAL lnWidth
>
>loTextBox = ThisForm.Control
>lnLength = fsize(lcField, lcAlias)
>
>*!* Work out the width based on the current font.
>lnWidth = txtWidth(replicate("w", lnLength), ;
> loTextBox.FontName, loTextBox.FontSize) * fontmetric(6, ;
> loTextBox.FontName, loTextBox.FontSize) + 2
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform