TamarGranor
Programmer
Figured I'd post this here as well as a couple of other places, since people here seem to be good at out of the box solutions:
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. I took a look at testing MDOWN() or using MouseDown (which turns out not to fire in this case). None 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. (Some controls are added at form start-up, others later.) 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
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. I took a look at testing MDOWN() or using MouseDown (which turns out not to fire in this case). None 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. (Some controls are added at form start-up, others later.) 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