Recent

Author Topic: right-click context menus to toggle between the Form Visual Designer and Code  (Read 336 times)

Marc_rp

  • Guest
Hello everyone,
Coming from a VB6/Delphi background, one feature I highly miss in Lazarus is having a quick option in the right-click context menus to toggle between the Form Visual Designer and the Source Code (just like the native F12 shortcut does).
Currently, we have to rely strictly on the F12 key.
Having a "View Form" option when right-clicking the Code Editor, and a "View Code" option when right-clicking a Form Component/Designer, would greatly improve the workflow and discoverability for new users migrating to Lazarus.
I tried implementing this via an IDE plugin package using MenuIntf, but due to recent API changes and deprecations (like SrcEditManager), it is quite tricky to maintain compatibility across different Lazarus versions.
It would be amazing if the core team could consider adding this small but high-utility quality-of-life feature natively to the default IDE context menus.
Thank you for the amazing work on Lazarus!

Dankan1890

  • Newbie
  • Posts: 6
I don't know if I understood correctly what you're looking for, but by activating the option as shown in the attached images, it is possible to switch from the code to the module via the interface.

n7800

  • Hero Member
  • *****
  • Posts: 710
  • Lazarus IDE contributor
    • GitLab profile
I don't know if I understood correctly what you're looking for, but by activating the option as shown in the attached images, it is possible to switch from the code to the module via the interface.

If this option is missing, make sure that you have the "DockedFormEditor" package installed via "Menu > Package > Install/Uninstall Packages".

n7800

  • Hero Member
  • *****
  • Posts: 710
  • Lazarus IDE contributor
    • GitLab profile
Coming from a VB6/Delphi background, one feature I highly miss in Lazarus is having a quick option in the right-click context menus to toggle between the Form Visual Designer and the Source Code (just like the native F12 shortcut does).
Currently, we have to rely strictly on the F12 key.
Having a "View Form" option when right-clicking the Code Editor, and a "View Code" option when right-clicking a Form Component/Designer, would greatly improve the workflow and discoverability for new users migrating to Lazarus.

Aren't you satisfied with the "Menu > View > Toggle Form/Unit View" menu option?

The advice mentioned above should also be helpful.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12428
  • Debugger - SynEdit - and more
    • wiki
There also is a Toolbutton in the IDE main bar's toolbar (coolbar).

And if you enable the editor toolbar (wich will be in the editor window) then you can *probably* add it there too. Which would be a mouse click like the menu, and easy to reach.

Of course going back to the editor is different...

Marc_rp

  • Guest
Thank you Dankan1890
I installed DockedFormEditor. The tabs are very useful for using the maximized code editor window to resize form controls via code.
« Last Edit: May 25, 2026, 12:47:05 pm by Marc_rp »

Marc_rp

  • Guest
Thank you Martin_fr for the button tip and the links you provided regarding the documentation. They will certainly be very helpful for learning.

 

TinyPortal © 2005-2018