Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I Resize a form based on textbox value
Message
De
11/12/1998 12:08:02
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00166623
Message ID:
00166629
Vues:
21
>I have a form that contains a textbox more or less the width of the form. I need to be able to resize the width of the form based on the size of the text in the textbox.
>
>Thank you
The following 'code' may give you some idea:
thisform.label1.caption="qqqq"+thisform.label1.caption
thisform.lockscreen=.t.
thisform.label1.visible=.t.
thisform.label1.visible=.f.
thisform.lockscreen=.f.
thisform.width=thisform.label1.width

Label1 is invisible label, but containing the same text (as caption) as real form.textbox. Label.Autosize=.t. You may call similar code any time you change Textbox.Value, e.g. from Textbox.Interactive/Programmaticchamge event.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform