In the IDE, Resized is fired before Resizing
In the debugger, I checked (I places a Beep with a Breakpoint in each Events) the window size and it is
Resized: Self.Width / Self.Height values are those before I click in the windows green button
Resizing: Self.Width / Self.Height values are those I expect for the resized window (after the click to expand the window).
Is this a bug ?
For reference:
PS: I was hunting a bug, but not that one !
(and I found it yesterday
and remove it Early in the morning)
[quote=132474:@Emile Schwarz]In the IDE, Resized is fired before Resizing
In the debugger, I checked (I places a Beep with a Breakpoint in each Events) the window size and it is
Resized: Self.Width / Self.Height values are those before I click in the windows green button
Resizing: Self.Width / Self.Height values are those I expect for the resized window (after the click to expand the window).
Is this a bug ?[/quote]
The bug is in using the beep and breakpoint, which probably change the order of events. To check the order of events, it is better to use System.Debuglog, like so :
Sub Resizing()
system.debuglog "Resizing "+str(me.width)+" "+str(me.height)
End Sub
Sub Resized()
system.debuglog "Resized "+str(me.width)+" "+str(me.height)
End Sub
When I do that, I get a wholes series of Resizing with the width and height changing while I move the mouse or while the window takes the whole screen with the green button, then afterward, the Resized event.
To see the log, click on the icon to the right of the IDE central pane bottom.
Scientists always tells that: watching an event have an effect on how the event is doing
Thanks Michel.