Recent

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

atlatl

  • New member
  • *
  • Posts: 9
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 from IRC

  • Hero Member
  • *****
  • Posts: 1293
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 »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

atlatl

  • New member
  • *
  • Posts: 9
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 from IRC

  • Hero Member
  • *****
  • Posts: 1293
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
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

Tony Stone

  • Full Member
  • ***
  • Posts: 243
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: 9
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: 9
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 from IRC

  • Hero Member
  • *****
  • Posts: 1293
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 »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

atlatl

  • New member
  • *
  • Posts: 9
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 from IRC

  • Hero Member
  • *****
  • Posts: 1293
Re: Resize form bug?
« Reply #9 on: January 08, 2025, 01:15:07 am »
Bug tracker link on left side of forum.
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

 

TinyPortal © 2005-2018