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:
00062601
Vues:
35
>>>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.

I've always had labels behave strangely when Autosize was set to .T.. Can you humour me and try you old method with Autosize set to .F.?

Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform