Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-05

OnResize event

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Shane Miller: Did you apply these patches or are you saying that the way it's implemented is wrong?…
Shane Miller wrote
Did you apply these patches or are you saying that the way it's implemented is wrong?

Wrong... naah, not directly, more unnessecary.

If you change the size of a window you should get a WMWindowPosChanged (and a WMSize) so the resize in the set bounds is unnessecary.

IF the GTK libs don't issue a WMWindowPosChanged (or WMSize) our interface should issue one (not the LCL)

Should they be implemented if you didn't already do it? I haven't taken a look at them yet.

I only added the call to resize in WMWindowPosChanged but I cant connect to cvs (disk full)

Marc

Reply by email

Shane Miller

Did you apply these patches or are you saying that the way it's implemented is wrong?

Should they be implemented if you didn't already do it? I haven't taken a look at them yet.

Shane

>> 05/04/00 07:46PM >>>
Vincent Snijders wrote 7 lines
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?

It looks a bit strange the WMWindowPosChanged massage came from the gtkinterface, and now we are telling the interface to move ourself to the position we are just moved to ????

The call to resize is a good point (at WMWindowPosChanged)

Marc (pressing send might be handy to send a message ;-)

Vincent Snijders.

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Vincent Snijders

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;

Reply by email

Vincent Snijders
to Vincent Snijders: I noticed the OnResize isn't called when I resize a form. I made the following changes to…
Show quoted text 7 lines
Hi, 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?

Shame on me. I should have tested better. On linux there is a loop when I run lazarus with the changes in control.inc. :-(. I have to think it over again. On win32 no problem though.
Multi-platform coding is not strait-forward :-(.

Vincent

Reply by email

Vincent Snijders

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 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
731,734c731
< FLeft := X;
< FTop := Y;
< FWidth := cX;
< FHeight := cY;
---

SetBounds(X, Y, cX, cY);

799a797

Resize;

Reply by email

Marc Weustink
to Vincent Snijders: I noticed the OnResize isn't called when I resize a form. I made the following changes to…
Vincent Snijders wrote 7 lines
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?

It looks a bit strange the WMWindowPosChanged massage came from the gtkinterface, and now we are telling the interface to move ourself to the position we are just moved to ????

The call to resize is a good point (at WMWindowPosChanged)

Marc (pressing send might be handy to send a message ;-)

Vincent Snijders.

Reply by email