Author Topic: The form designer works incorrectly after adding the main menu  (Read 825 times)


  • Full Member
  • ***
  • Posts: 216
I am creating a simple program consisting of:
  • main menu (TMainMenu),
  • toolbar (TToolBar),
  • workspace (TPanel) with several controls inside,
  • status bar (TStatusBar), which has 2 panels.
I don't see the status bar in the form designer. I checked the properties set for all controls in the object inspector. But there is nothing unusual about them. However, if I increase the height of the status bar (e.g. to 24 pixels or more) in the object inspector, its top edge appears. The more I increase the height of the status bar, the more of it is visible, but still its lower part is not visible (cut off). After replacing the status bar with various controls at the bottom of the window, it turned out that they too are clipped. So it's not just related to the status bar. Of course, after compilation, the designed window displays correctly. This is not a bug that prevents you from working. But with more complex forms, it is tiring.

I made an attempt to build the window design step by step to catch the step that causes the form designer to display the controls incorrectly. Everything was displayed correctly until I added the first item to the main menu in the project. Simply placing the TMainMenu component on the form does not cause the form designer to malfunction. Only adding any item (TMenuItem) in the main menu (first level is enough) triggers incorrect drawing of the designed form. Removing all items from the main menu (i.e. TMenuItem, not TMainMenu!), causes the designer to automatically draw the form correctly. I checked the behavior of Lazarus on 2 machines.

1 computer:
  • Windows 8.1 64-bit,
  • Lazarus 2.2.4 (with packages: AnchorDocking, AnchorDockingDsgn, DockedFormEditor),
2 computer:
  • Windows 10 64-bit,
  • Lazarus 2.2.6 (with packages: AnchorDocking, AnchorDockingDsgn, DockedFormEditor),
I attach 2 versions of the window design: with and without the main menu.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4370
  • I like bugs.
Re: The form designer works incorrectly after adding the main menu
« Reply #1 on: June 05, 2023, 04:23:31 pm »
Please test with the development branch "main".
I remember that DockedFormEditor had such a bug but it was fixed. I am not sure though, wp knows better.
« Last Edit: June 05, 2023, 10:18:04 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.


TinyPortal © 2005-2018