View Issue Details

IDProjectCategoryView StatusLast Update
0038004LazarusLCLpublic2020-11-12 11:26
ReporterReiner Sombrowsky Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformWindows64OSWindows10 
Product Version2.1 (SVN) 
Summary0038004: Not executing the "OnResize" method in an embedded TForm
DescriptionTested in
Lazarus Version 2.1.0 SVN-Trunk-Revision: 64078
FPC Version 3.3.1 SVN-Trunk-Revision: 47230
The "OnSize"-method of an embedded "TForm1" object will not be executed.
In the Lazarus-Version 2.0.10 it works korrect. Here two units to simulate this:
Main unit with two SpeedButtons (the uexdebug unit is me own debug tool):
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[example code was cut from here by Juha]
Steps To ReproduceGenerate a simple Application with the obove two units
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0037467 resolvedJuha Manninen Form Resize Not Firing Correctly 
related to 0036127 resolvedJuha Manninen [Patch] TForm's bounds and restored bounds are inconsistent 

Activities

Reiner Sombrowsky

2020-10-28 17:57

reporter   ~0126609

Please excuse me in the Line of
procedure TForm2.DoOnResize;
the comment must be:
// It will be execute !!!!!!

Bart Broersma

2020-10-28 18:20

developer   ~0126610

Please attach a self-contained compileable example (sources only).
And no, the code in the description is not enough (it lacks the lfm's to begin with).

Reiner Sombrowsky

2020-10-29 09:34

reporter   ~0126626

Last edited: 2020-10-29 09:35

View 2 revisions

Here is a simple project without binaries to simulate it
form_resize.zip (130,697 bytes)

Anton Kavalenka

2020-10-29 09:57

reporter   ~0126628

As far I understand - embedded form is not aligned in any way.
It is just reparented in the same size as it has been created.
Not sure if the resizing engine would be invoked at all.

Reiner Sombrowsky

2020-10-29 10:41

reporter   ~0126629

Dear Mr. Kavalenka,
the single "form_resize" project is running succesfull
in Lazarus version 2.0.10

Juha Manninen

2020-10-29 11:53

developer   ~0126631

This sounds like 0037467. I thought it was fixed.

Reiner Sombrowsky

2020-10-29 13:34

reporter   ~0126634

Last edited: 2020-10-29 13:34

View 2 revisions

It is not like 0037467 because in the main TForm
it works correctly but not in an embedded TForm

Bart Broersma

2020-10-29 18:14

developer   ~0126643

Last edited: 2020-10-29 18:19

View 2 revisions

Lazarus 2.1.0 r63988 FPC 3.2.0 i386-win32-win32/win64
I put in some debug writeln's and it outputs this upon resize of Form2:
TForm2.DoOnResize
TForm2.FormResize

So, Form2's OnResize handler is called as expected.
Tested with 32 and 64 bit.

[Edit]
Re-tested with r64084: still OK.

Reiner Sombrowsky

2020-11-12 10:53

reporter   ~0126852

Last edited: 2020-11-12 10:55

View 3 revisions

I have compiled my small obove application with
FPC-Version 2.3.1 Rev.: 47389
Lazarus Version 2.1.0 Rev.: 64125
with my own debug tools and I found the
OnResize was correctly called, but not shown
in TForm1, because the OnResize will be
Queued in the mainloop.

The first test with Lazarus Version 2.1.0 Rev,: 64078
the OnResize was not called.

I think the problem is now solved.

Bart Broersma

2020-11-12 11:26

developer   ~0126854

Resolved as per request origial reporter.
Please close.

Issue History

Date Modified Username Field Change
2020-10-28 17:08 Reiner Sombrowsky New Issue
2020-10-28 17:57 Reiner Sombrowsky Note Added: 0126609
2020-10-28 18:20 Bart Broersma Status new => feedback
2020-10-28 18:20 Bart Broersma LazTarget => -
2020-10-28 18:20 Bart Broersma Note Added: 0126610
2020-10-29 09:34 Reiner Sombrowsky Note Added: 0126626
2020-10-29 09:34 Reiner Sombrowsky File Added: form_resize.zip
2020-10-29 09:34 Reiner Sombrowsky Status feedback => new
2020-10-29 09:35 Reiner Sombrowsky Note Edited: 0126626 View Revisions
2020-10-29 09:57 Anton Kavalenka Note Added: 0126628
2020-10-29 10:41 Reiner Sombrowsky Note Added: 0126629
2020-10-29 11:44 Juha Manninen Product Version => 2.1 (SVN)
2020-10-29 11:44 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-10-29 11:48 Juha Manninen Description Updated View Revisions
2020-10-29 11:48 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-10-29 11:51 Juha Manninen Relationship added related to 0037467
2020-10-29 11:53 Juha Manninen Relationship added related to 0036127
2020-10-29 11:53 Juha Manninen Note Added: 0126631
2020-10-29 13:34 Reiner Sombrowsky Note Added: 0126634
2020-10-29 13:34 Reiner Sombrowsky Note Edited: 0126634 View Revisions
2020-10-29 18:14 Bart Broersma Note Added: 0126643
2020-10-29 18:19 Bart Broersma Note Edited: 0126643 View Revisions
2020-11-12 10:53 Reiner Sombrowsky Note Added: 0126852
2020-11-12 10:54 Reiner Sombrowsky Note Edited: 0126852 View Revisions
2020-11-12 10:55 Reiner Sombrowsky Note Edited: 0126852 View Revisions
2020-11-12 11:26 Bart Broersma Assigned To => Bart Broersma
2020-11-12 11:26 Bart Broersma Status new => resolved
2020-11-12 11:26 Bart Broersma Resolution open => no change required
2020-11-12 11:26 Bart Broersma Widgetset Win32/Win64 => Win32/Win64
2020-11-12 11:26 Bart Broersma Note Added: 0126854