General information
Category:
Forms & Form designer
>>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
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