Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement