General information
Category:
Forms & Form designer
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only