Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I center a label on the form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00062470
Message ID:
00062585
Vues:
28
>>I saw it before, but I can't remember where.
>>
>>I want to center a label horizontally. The label as AutoSize = .T.
>>
>>I tried THISFORM.lblMessage.Left = (THISFORM.Width - THISFORM.lblMessage.Width) / 2, but it doesn't work.

OK, I found a solution. I put a timer with Interval = 1.
In the timer event I put my centering code and put the timer Interval = 0.
The only downside of this approach is that you see the label moving from it's original position to the new one.

In my opinion, it's a patch. Hope that there is a better way.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform