[lazarus] OnResize event

Vincent Snijders vrs at dds.nl
Thu May 4 18:14:39 EDT 2000


Hi,

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
TControl.Resize.
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 testprogram.

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
731,734c731
<     FLeft := X;
<     FTop := Y;
<     FWidth := cX;
<     FHeight := cY;
---
>     SetBounds(X, Y, cX, cY);
799a797
>     Resize;





More information about the Lazarus mailing list