Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling resize and anchoring
Message
From
20/01/2007 08:01:01
 
 
To
20/01/2007 07:49:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01185929
Message ID:
01187320
Views:
25
>I think you and others have one thing wrong in your understanding of anchoring:
>if you programmatically set some left,top, height or width value, these values are not recalculated by the current Anchor setting of the control, but taken as they are. The Anchor setting only effects the values computed due to a form resize or a resize of the container containing the control.

Right. That's why I asked the question in the first place. What I wanted to do was set up assign methods for Left, Top, Height and Width that could figure out on their own whether to reset Anchor to recognize the new position or now.

>So if you modify the anchor setting within some left, top, height or width assign it's already too late, the value passed in is already computed regarding the anchor value, setting the Anchor to 0 does not change the value of the parameter.

In my testing, this wasn't an issue, but maybe that's because I was trying to do it from the other side. That is, my goal was to recognize the interactive resize and leave anchoring there, but reset it on programmatic changes.

Doing it that way, the code that makes programmatic changes wouldn't have needed anything special. That said, I've found no way to reliably identify the end of an interative resize, so gone back to resetting Anchor manually every time I have a programmatic resize/reposition.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform