Author Topic: AnchorDocking and Resize MainForm  (Read 660 times)

King of Pascal

  • New Member
  • *
  • Posts: 17
AnchorDocking and Resize MainForm
« on: August 31, 2026, 03:42:46 pm »
Hello everyone.

When adding dock windows to the main model, does the main model become very slow when its height and width dimensions are moved? Is there a solution to get rid of this slowness?

n7800

  • Hero Member
  • *****
  • Posts: 779
  • Lazarus IDE contributor
    • GitLab profile
Re: AnchorDocking and Resize MainForm
« Reply #1 on: August 31, 2026, 09:47:51 pm »
Hello, do you mean using the package specifically in a user application, or docking windows within the IDE itself?
It's also important to know your OS and WS (e.g. win32/gtk2/qt5), as well as your Lazarus version.

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #2 on: August 31, 2026, 10:52:46 pm »
My friend, when I create a project with docked windows that are anchored in containers, and I start moving the main window, I notice it's very slow. My version is 4.8. Where can I find it? (OS and WS (e.g., win32/gtk2/qt5))

n7800

  • Hero Member
  • *****
  • Posts: 779
  • Lazarus IDE contributor
    • GitLab profile
Re: AnchorDocking and Resize MainForm
« Reply #3 on: August 31, 2026, 11:11:08 pm »
Where can I find it? (OS and WS (e.g., win32/gtk2/qt5))
Sorry, these abbreviations have become a habit... "OS" is the operating system, "WS" is a widget set. Windows only has one widget set, but Linux can have different ones.

As far as I know, unless you've changed the WS for a project, the same WS is used as the IDE itself, so check the "Menu > Tools > Configure Build Lazarus" (combobox "LCL widget type"). But I rarely use Linux, so I could be wrong.

zeljko

  • Hero Member
  • *****
  • Posts: 2006
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: AnchorDocking and Resize MainForm
« Reply #4 on: September 01, 2026, 08:38:01 am »
Windows does not have only one ws. Qt, qt5 and qt6 works on windows.

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #5 on: September 01, 2026, 01:20:20 pm »
Does it work on a 64-bit system? I'm using Lazarus 4.8 64-bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12731
  • Debugger - SynEdit - and more
    • wiki
Re: AnchorDocking and Resize MainForm
« Reply #6 on: September 01, 2026, 01:57:44 pm »
Do you have the IDE use anchordocking? Is the IDE fast or slow?


It should not be slow. But without knowing all details it is hard to say.

How many controls (buttons, labels, tabs, ....) are on each form?
How many forms are in the docked model?

Change Height/Width must compute positions for all forms and controls.

--------------------
Have you tested on Windows AND Linux? Are BOTH slow?

The Operating system (Windows/Linux) must repaint all of them.




If you mean:

When changing height/width there is a visible moment (half a second) where the window/model is not painted (black area, or old content) => yes that does happen.

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #7 on: September 01, 2026, 03:53:34 pm »
Welcome, my friend.

Yes, I use this: anchordocking.

The development environment is also slow.

There are no controls, only panels.

Only on Windows; it hasn't been tested on other systems. Windows 10 64-bit.

The problem is that when you first move the model, it moves perfectly, but after some time it gradually slows down, making it difficult to resize. The problem lies with both the models you're writing and the development environment.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12731
  • Debugger - SynEdit - and more
    • wiki
Re: AnchorDocking and Resize MainForm
« Reply #8 on: September 01, 2026, 05:11:43 pm »
Only on Windows; it hasn't been tested on other systems. Windows 10 64-bit.

The problem is that when you first move the model, it moves perfectly, but after some time it gradually slows down, making it difficult to resize. The problem lies with both the models you're writing and the development environment.

And that is good information.

With that I did a test (based on the IDE).
It leaks GDI objects. (That is internal to the system).

So yes, over time it will become very slow. Potentially even crash.



This is a bug in Lazarus.  (And it still needs lots of work to find where exactly)

So you cannot fix that in your project.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12731
  • Debugger - SynEdit - and more
    • wiki
Re: AnchorDocking and Resize MainForm
« Reply #9 on: September 01, 2026, 05:20:38 pm »
Ok so I tested with 4.99 (that is "trunk" / the "not yet released" code).

And that is ok. No problem.

But I can't see where/when it was fixed. And my test may be wrong, as the setup was not exactly the same.

Needs more investigation...

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #10 on: September 01, 2026, 05:54:54 pm »
I suspect there's a ghost entity that isn't released and remains behind the scenes, not even consuming any memory. I've tried searching the anchordocking module repeatedly.

The module is very large, so it would be difficult to find this vulnerability. If you find a solution, please send it to me or post it here. Thank you.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12731
  • Debugger - SynEdit - and more
    • wiki
Re: AnchorDocking and Resize MainForm
« Reply #11 on: September 01, 2026, 06:01:47 pm »
If you want you could try https://sourceforge.net/projects/lazarus-snapshots/files/Window%2064/2026-07%20lazarus-4.99-fcc2360a44-fpc-3.2.4-rc1-30dd873d32/

This is a snapshot of 4.99 (only 2 month older that what I have just tested with). Its code signed, so you know its from the Lazarus team.

You can select "secondary installation" when installing it. (for the config path use an empty folder anywhere, even inside that new install)
e.g. install to c:\laz2 and config to c:\laz2\conf

Backup your projects before you open them.  (because it may update project when you open them).

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #12 on: September 02, 2026, 07:18:07 am »
After downloading and installing it, a conflict arises regarding the files in the AppData folder.
Therefore, we await the next release.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12731
  • Debugger - SynEdit - and more
    • wiki
Re: AnchorDocking and Resize MainForm
« Reply #13 on: September 02, 2026, 07:42:28 pm »
After downloading and installing it, a conflict arises regarding the files in the AppData folder.
Therefore, we await the next release.

Did you check "Create a new secondary installation" ? (see image)

And on the next page, entered a path for the config?

King of Pascal

  • New Member
  • *
  • Posts: 17
Re: AnchorDocking and Resize MainForm
« Reply #14 on: September 04, 2026, 02:46:42 pm »
Alright, I managed to get it working, but after looking into the docking functionality, I found that the EasyDockSite tools are far superior to the object currently included in version 4.8. I hope the next version resolves the issue; let me know when the new version is released.

 

TinyPortal © 2005-2018