Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Autosize programmatically
Message
 
 
À
23/07/1998 07:25:47
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00120363
Message ID:
00120571
Vues:
19
Rex,

There isn't much rhyme or reason to exactly when VFP updates the .Width of an AutoSize=.t. label. The label first instantiates with a .Width of the class, not the size that shows up on the property sheet. The .Width doesn't change until the first Form.Activate() (if I remember correctly that's when it happens). If you change the .Caption at runtime I'm not sure when .Width updates.

I've got a Label subclass that acts like a hyperlink. At Init() it adds an CommandButton that is set to Style = Invisible. In the GotFocus() of the button I have to adjust it's .Width to get the highlight to properly size itself around the Label.

>I have a label control with AutoSize = .T. I am setting the Caption property programmatically, but the width is not changing (as you might expect with AutoSize = .T.)
>
>Is AutoSize for interactive change only, or do I need to do something else to make it work.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform