[lazarus] OnResize event

Vincent Snijders vrs at dds.nl
Wed May 3 20:39:50 EDT 2000


I noticed the OnResize isn't called when I resize a form.

I made the following changes to control.inc:
Changed the TControl.Setbounds procedure to include a call to
Changed the TControl.WMWindowPosChanged procedure to call TControl.Setbounds
instead of changing Left, Top, Width and Height it self.

This seems to work in my test program.

A diff of these changes is attached.

Please check if this is a good change. I am not sure no double work is done
in SetBounds, for example doesn't the CNSendMessage(LM_SetSize call genrate
a new WMWindowPosChanged message?

Vincent Snijders.

Index: lazarus/lcl/include/control.inc
RCS file: /FPC/CVS/fpc/lazarus/lcl/include/control.inc,v
retrieving revision 1.7
diff -r1.7 control.inc
<     FLeft := X;
<     FTop := Y;
<     FWidth := cX;
<     FHeight := cY;
>     SetBounds(X, Y, cX, cY);
>     Resize;

More information about the Lazarus mailing list