Recent

Author Topic: Resize form bug?  (Read 6720 times)

atlatl

  • New Member
  • *
  • Posts: 21
Resize form bug?
« on: January 06, 2025, 05:14:44 pm »
Total Lazarus newbie here.

I've run into an issue with resizing forms by dragging an edge or corner.

I created a new application project.
Set the minHeight and minWidth constraints of the form to non-zero values.
Build.
Launch the app.
Resize the form by dragging the left or top edge, and returning it back to it's minimum heght or width.

The opposite side of the form moves toward the side I'm dragging, 'creeping' across the screen as I  repeat.
It seems the amount of 'creep' is somewhat proportional to the speed of the mouse movement.
No 'creep' if dragging the right or bottom edges.

I've tried this on both Lazarus 3.7 x86_64-darwin, and 4.0RC1 aarch64-darwin on a MacBook running MacOS 13.2.

Joanna

  • Hero Member
  • *****
  • Posts: 1400
Re: Resize form bug?
« Reply #1 on: January 06, 2025, 06:18:22 pm »
I’m curious what happens if you don’t set the min height, width values..
« Last Edit: January 07, 2025, 12:19:31 am by Joanna from IRC »

atlatl

  • New Member
  • *
  • Posts: 21
Re: Resize form bug?
« Reply #2 on: January 06, 2025, 06:39:52 pm »
I’m curious what happens if you don’t sen the min height, width values..

Nothing unusual...no 'creep'.

I've found it happens with maxHeight and maxWidth too, except the window moves away from the mouse.

Joanna

  • Hero Member
  • *****
  • Posts: 1400
Re: Resize form bug?
« Reply #3 on: January 07, 2025, 12:32:23 am »
What happens if you correct height/width getting too narrow in the form resize event like
Code: Pascal  [Select][+][-]
  1. if width< Desiredwidth Then width:= desiredwidth
  2. If height < desiredheight then height:= desiredheight

Tony Stone

  • Sr. Member
  • ****
  • Posts: 270
Re: Resize form bug?
« Reply #4 on: January 07, 2025, 01:44:59 am »
Does the form have to have ANY other controls on it to have this issue?  I know what you are talking about.  I have seen this happen when editing a form and cuttong/copying/pasting components to move on the form when the parent changes.  Usually when it happens I have to restart the IDE.  But you are saying this happens at run time right and not during design...  I am curious if you have the issue with different controls on the form. At one point I was trying to get to the bottom of it and I think I ended up finding an issue where a splitter control was causing the same effect but I never dug deeper.

atlatl

  • New Member
  • *
  • Posts: 21
Re: Resize form bug?
« Reply #5 on: January 07, 2025, 02:15:51 am »
Does the form have to have ANY other controls on it to have this issue?  I know what you are talking about.  I have seen this happen when editing a form and cuttong/copying/pasting components to move on the form when the parent changes.  Usually when it happens I have to restart the IDE.  But you are saying this happens at run time right and not during design...  I am curious if you have the issue with different controls on the form. At one point I was trying to get to the bottom of it and I think I ended up finding an issue where a splitter control was causing the same effect but I never dug deeper.

No other controls, just the form itself.

I hadn't thought to try it in the IDE until you mentioned it. And yes, it happens there too. Tried restarting the IDE, created a new project, set the constraints and it's doing it.

atlatl

  • New Member
  • *
  • Posts: 21
Re: Resize form bug?
« Reply #6 on: January 07, 2025, 02:25:31 am »
What happens if you correct height/width getting too narrow in the form resize event like
Code: Pascal  [Select][+][-]
  1. if width< Desiredwidth Then width:= desiredwidth
  2. If height < desiredheight then height:= desiredheight

Not good. Really bad flicker when resizing from the right and bottom. From the left and top, once the form hits the desired size, it just slides along very smoothly, like I was dragging it by the titlebar.

Joanna

  • Hero Member
  • *****
  • Posts: 1400
Re: Resize form bug?
« Reply #7 on: January 07, 2025, 01:31:12 pm »
Is the form doublebuffered?
These behaviors seem buggy. You might want to enquirer further.
« Last Edit: January 07, 2025, 01:50:50 pm by Joanna from IRC »

atlatl

  • New Member
  • *
  • Posts: 21
Re: Resize form bug?
« Reply #8 on: January 07, 2025, 09:19:43 pm »
Is the form doublebuffered?
These behaviors seem buggy. You might want to enquirer further.

Double buffering helps with the flickering, but not with the creep.

Whom would I contact to enquire?

Joanna

  • Hero Member
  • *****
  • Posts: 1400
Re: Resize form bug?
« Reply #9 on: January 08, 2025, 01:15:07 am »
Bug tracker link on left side of forum.

wcage03

  • New Member
  • *
  • Posts: 27
Re: Resize form bug?
« Reply #10 on: April 01, 2025, 10:58:01 pm »
...I know what you are talking about.  I have seen this happen when editing a form and cuttong/copying/pasting components to move on the form when the parent changes.  Usually when it happens I have to restart the IDE...

Tony, can you shed any more light on the specific use case where you have seen this? I noticed today on a project that I can no longer resize any forms including the IDE itself. Everything else seems to be fine. You mentioned cutting and pasting a component. I did that earlier today. I can't tie the timing of the resize to that, but it is something that I know I did. i looked through the ilf file and nothing looks odd.

I am running on Ubuntu 24.04 with the packaged version of Lazarus (3.0). I have been using it without issue for sometime now. I have tried close and restart, open other projects, and looked through all of the constraints for the forms and components (all are set to zeros). The thing that is most puzzling is that this impacts the IDE window itself, not just forms. I am using the docked version of the IDE.

Any insight you can share will be appreciated.

Tony Stone

  • Sr. Member
  • ****
  • Posts: 270
Re: Resize form bug?
« Reply #11 on: April 04, 2025, 06:30:16 pm »

Any insight you can share will be appreciated.

If you did cut/copy paste any components and they are in a different container, or have a different parent control now and you had previously set anchors it may have an anchor issue.  I find it is some times problematic when copying and pasting components when on a form specially when I had anchors set.  There is certainly some bugs with that functionality that should be investigated further.  I just had it again recently where I got stuck with a circular reference error and I ended up manually editing the LFM.  Beyond that I cant shed much light because whenever I run into this issue it is on some complex form and it is too much work to try and give a proper bug report.  If I had more time I would find a way to reproduce it and submit a bug report.

 

TinyPortal © 2005-2018