Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I center a label on the form
Message
From
27/11/1997 22:30:57
 
 
To
27/11/1997 09:13:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00062470
Message ID:
00062654
Views:
39
>>The Width property doesn't return a wrong value. But since your label has Autosize = .T., the label will change its width each time you change the label.
>>
>>But the Width change due to Autosize is not instantaneous. Also, the Width will not change if the label is not visible, but only when the label will become visible. (There are several cases when the label is not visible, not only when Visible = .F.)
>>
>>Try to put your centering code in the label's Refresh method. It might work, depending on your "rest of the code". (It doesn't work if the screen is locked, for ex.)
>
>I couldn't put the centering code in the label's Refresh() method, because a label don't have a Refresh() method :)

How right you are! :) I keep forgeting this... :)

>Is there any other function that return the size of the label?

No. The lable must be visible in order to have the correct value in the Width property.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform