Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

DesktopSwitch

Desktop Switch is a package for the Lazarus IDE. With this package, it is possible to link desktop configurations to the unit and form views.

View on GitLab

Member rating

No ratings yet.

Sign in to rate this project.

README

Desktop Switch

in deutsch

What is it?

Desktop Switch is a package for the Lazarus IDE. With this package, it is possible to link desktop configurations to the unit and form views. If you switch views with F12 or the button in the toolbar, the desktop will also switch. This can make your work much easier, especially if you are working on a laptop. This is because you need different tools for designing the form than for editing the source code.

Based on an idea by Heiko Rompel and inspired by Pluto.

Testet with Lazarus Version

WINDOWS 3.4 4.4 4.6
LINUX 3.4 4.4 4.6

Current package version:0.1.2

Download

With Git

Open a console and change to the directory where you want to save the package.

bash
git clone https://gitlab.com/FpTuxe/desktopswitch.git

Alternatively, via your web browser

Click on the ‘Code’ button at the top right and select ‘Download source code’ at the bottom in your compression method.

Installation

There are two packages

  • ‘desktopswitch_std.lpk’: Use this for the standard Lazarus installation or standard Lazarus installation with the ‘AnchorDocking’ package.
  • ‘desktopswitch_dockedformeditor.lpk’: Please install this package with Lazarus with “AnchorDocking” and ‘DockedFormEditor’!!

Start Lazarus. Open the package via ‘Package->Open Package File (your-choice.lpk)’. To install, select the ‘Use->Install’ button. The ide will now be recompiled.

Configuration

If you only had two desktops until now, two new ones have now been created (‘Desktop Design’ / ‘Desktop Source Code’). Configure these according to your needs and don't forget to save them. Now go to ‘Tools->Options...’ Select ‘Environment/Desktop Switch’. Now assign your desktops and activate the desktop switch.

Operation

You can now switch desktops using F12 or the ‘Form/Unit View’ button. You can enable or disable this behaviour using ‘View->Desktop Switch’.

Translated with DeepL.com (free version)

Known issues

Unterlinux with AnchorDocking Package. If you close and open the Object Inspector and then select an enumeration field, e.g. Align, a serious address error occurs. Fixed in Lazarus version 4.6 and later.

Workaround for older versions: In the file ‘lazarus/lcl/include/customcombobox.inc’, extend the method ‘procedure TCustomComboBox.DestroyWnd’.

pascal
   inherited DestroyWnd;
+
+  if FCanvas <> nil then
+    TControlCanvas(FCanvas).FreeHandle;
 end;

Finally, recompile IDE.