Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling resize and anchoring
Message
From
16/01/2007 13:19:16
 
 
To
16/01/2007 11:45:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01185929
Message ID:
01185990
Views:
33
>I'm going to start with the short question and then explain what got me to it.
>
>Is there something that reliably fires when an interactive Resize is complete? I have a situation where I want to set a flag in Resize and turn it off when the operation is done. I've tried using NODEFAULT/DODEFAULT() to handle it all in Resize. I've also tried binding another event to Resize, set to fire after Resize. Neither of those gives me what I need (unless I'm missing something).
>
>Here's the background. I'm working on an application where some forms are built dynamically at runtime. In addition, some of these forms need to resize dynamically, that is, when the user resizes the form, everything needs to scale up or down.
>
>I'm using Anchor (mostly set to 240, relative everything) and a font resizing class to handle the second requirement and I had it working fairly well. However, building the form dynamically means turning Anchor off and resetting it as things are added. I've been trying to do this with a set of Assign methods on Left, Top, Height and Width. The problem is, those assign methods fire on an interactive resize, not just programmatic. So, I'd like to set a flag at the beginning of Resize and turn it off afterward. Then I could check this property in the *_Assign methods and only reset Anchor when it's a programmatic change.
>
>My fallback solution is remove the *_Assign methods and have to remember to save/reset Anchor every time something is added dynamically. But I'd really love to build the behavior into the classes.
>
>Any suggestions?
>
>Tamar

Tamar,

Think that what you're describing here depends on the settings
[Desktop | RightClick | properties | tab Appearance | button Effects | Show window contents while dragging ]

If Off, you have one resize event after the user finishes the resize
If On, you get continuous resize events while the window resize is in progress

You can test with both settings, first with the windows explorer, then with a foxpro window

If ON, the window contents get refreshed/updated while resize is in progress.


In a nutshell, if the setting is ON, you will never know when the user will stop and release the mouse button since the event has already been processed
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform