Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Label doesn't move to correct position
Message
From
25/02/2010 13:32:35
 
 
To
25/02/2010 12:52:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01450840
Message ID:
01451021
Views:
55
>>Hi Tamar.
>>
>>>It works, sort of. Most of the time, when I test, any two-digit labels (there's nothing more than 2 digits) start out to the left of where they should be and when the form repaints (which happens based on other things going on in the app), shift to the right into the right position.
>>
>>I've seen this before when the control has Anchor set to a non-zero value. When you move or resize the control in that case, you're fighting against anchoring. Try setting Anchor to 0, change Left, then restore Anchor.
>>
>
>Darn, I knew that (and have code all over this app that fixes it where I need to move things around). Can't believe I didn't check. I'm pretty sure that's it.
>

So, it wasn't that simple, but I combined this with Jim's suggestion about "kicking" the width and now it's working. (Actually, since I was computing the width anyway, I just turned off AutoSize for the label and set it manually.)

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform