Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I center a label on the form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00062470
Message ID:
00062585
Views:
40
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform