Forum > LCL
Resize form bug?
atlatl:
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:
I’m curious what happens if you don’t set the min height, width values..
atlatl:
--- Quote from: Joanna from IRC on January 06, 2025, 06:18:22 pm ---I’m curious what happens if you don’t sen the min height, width values..
--- End quote ---
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:
What happens if you correct height/width getting too narrow in the form resize event like
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if width< Desiredwidth Then width:= desiredwidthIf height < desiredheight then height:= desiredheight
Tony Stone:
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.
Navigation
[0] Message Index
[#] Next page