The window has been resized by the user or by code that changes the windows Width or Height properties.[/code]
But I have some code resizing the window and do not want this to change some properties, I only want the properties to change when the user resizes the window. How can I do this?
Resizing only fires when the user is “in the process”, but as soon as he is done, “resized” fires, right?
Since it seems to be about the Resizing and Resized event not firing when they are supposed to, I did encounter that before, in ContainerControls, where Resizing and Resized do not fire, among others.
The workaround I found was to have a 100 ms multiple timer monitor Width and Height, so these events can be detected. For a perfectly smooth live resize, a resolution of 17 ms (60 frames/second) is probably better if you must resize stuff yourself.
Now to discriminate between code and user. If it is code, it does not seem terribly difficult to set a flag when your own code resizes the window so you know it does. But anyway, it is fairly simple to look where the mouse cursor is. When it is between -10 and +10 pixels of any window border (bounds.top, left, right, bottom), the resize is initiated by the user.
That said, Dave, it is always a pity when the guy who initiated the thread deletes his post. So nobody understands what it is about. I think it is rude and careless. Please abstain to do that in the future.
45495 - Forum : Prevent people to delete the post that initiated the thread
Status: Needs Review Rank: Not Ranked Product: Xojo Category: N/A