Recent

Author Topic: Latest trunk not firing Form Resize  (Read 1161 times)

Josh

  • Hero Member
  • *****
  • Posts: 1271
Latest trunk not firing Form Resize
« on: July 31, 2020, 09:52:20 pm »
Hi

Hope other can confirm
Testing latest trunk Lazarus 2.1.0 r63671 FPC 3.3.1 x86_64-win64-win32/win64

The form resize event is only fired once; after you have finished reszing, it should be firing every time width,height etc changes.
This is only a recent change.

Simple project attached demostrating the issue.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: Latest trunk not firing Form Resize
« Reply #1 on: August 15, 2020, 04:27:10 pm »
Hi All,

Coming back to this issue, done some other test and it gets more confusing.

I have updated to latest version of Trunk
Lazarus 2.1.0 r63745 FPC 3.3.1 x86_64-win64-win32/win64

If I set the anchors on the label so that the label auto sizes to form size and positions itself to the right of the label, the label moves as expected, but the form re-size event is not fired, if i use call the form re-size code in the label re-size event the form event is called as expected.

I added a checkbox to the sample so you can turn this behaviour on/off. This itself I notice another bug, I change the checkbox font color to white in the ide, but the ide still shows the checkbox font as black, if you run then the font color is showmn correct.

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Latest trunk not firing Form Resize
« Reply #2 on: August 15, 2020, 04:59:53 pm »
I Ran a little test over here with 2.0.10 64 bit placing a label on the form to the right, setting the anchors so it moves with the form and reporting width of the form in the OnSize event to the caption

Caption := Width.Tostring;

I even placed a button on the form to randomly change the width and in both cases the OnSize Gets called always..

 Maybe you have a lag issue  or are doing something that upsets the balance of the sizing..

 P.S.
  its not good to change the size of controls during a even like that, you can cause a re-loop effect.
The only true wisdom is knowing you know nothing

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: Latest trunk not firing Form Resize
« Reply #3 on: August 15, 2020, 08:35:31 pm »
Hi Jamie,

Thanks for replying, and taking the time to do some tests.

The issue is with the later Trunk version.
It does not manifest on any thing earlier, stable releases are fine, even going back to 1.3

I added the extra code to the label resize to see if that was being called when the form is being resize; and it is, it is the fact the formresize is not being called when form is being resize.

My apps use the form resize to resize controls based on the dimensions of the form; adjust font sizes border sizes line width etc to keep everything in proportions. I have added code to stop recursive entry of my resize function on My apps; the small app was done to just show the issue.

I suspect the project I uploaded may not have loaded with non Trunk versions, this was on purpose ( did not save with max compatibility) as it works fine on latest stable version, but not Trunk

This is only a change on Trunk, that appeared some time after r63401 

Josh

Additional; each time I update my Trunk; its a total fresh install; with only standard Components. I only use trunk to test; to check on compatibilty on changes that may effect my apps further down the line.
« Last Edit: August 15, 2020, 08:41:32 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Latest trunk not firing Form Resize
« Reply #4 on: August 15, 2020, 11:39:22 pm »
Then I suggest to put together a very simple demo app and post it on the bug site.
The only true wisdom is knowing you know nothing

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: Latest trunk not firing Form Resize
« Reply #5 on: August 15, 2020, 11:59:05 pm »
Hi Jamie

I had placed a bug report

https://bugs.freepascal.org/view.php?id=37467

I was just looking for some confirmation on forum from other users,

Josh
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018