Overview

Top  Next

Features

 

The LMD-DockingPack provides you 100% VCL native controls which can be used to build applications with entirely customizable and modern user interface. The library has following main features:

 

Advanced site control with horizontal, vertical or tabs dock zones, splitters and shifting "auto hide" zones.

Transparent hot-spots drag-over active areas.

Additional drag-over active areas in tab zones and splitters.

Ability to place required user interface controls on the panels (TLMDDockPanel) - prevents having many distinct forms in the project.

Advanced design-time features with drag-and-drop zones rearrangement.

True proportional zones resizing. The LMD-DockingPack uses double coefficients to store proportional sizes that prevent proportion-lost bug while very slow resizing.

The notion of "space" zone. That is the central zone with main application content. The central zone has following useful special properties: space zone have highest priority to resize when the dock site is resizing, leaving all other edge zones with the same size; edge zones "auto hide" side is automatically detected relatively to space zone.

Using space zone gives following additional features: Unlike Delphi standard sites, like TPanel, dock-client can be docked into empty site to the edge, not only to the whole site area. This is more naturally from the user viewpoint. Dock-out of the space panel from the site does not corrupt edge zones layout.

Built-in native tabbed documents support: including special hotspot areas, close tab buttons and special floating form style.

Allowing locking some panels to prevent them to be dock-out from the site, using DragMode, ShowHeader and Buttons properties of the TLMDDockPanel. Allowing intercepting dock-dropping using OnCustomInsertQuery and OnCustomInsert events of the TLMDDockSite. These two features allow organizing fully custom central zone, like "tabbed documents" in Microsoft™ Visual Studio.

Advanced global saving/loading of the current dock layout. The TLMDDockManager control allows to save/load any all dock sites, including dynamically created floating sites, in XML format. TLMDDockSite.LoadDesignLayout property and TLMDDockManager.ApplyDesignLayout method allows to defer applying design-time layout in application to prevent flickering.

Advanced dock panel lifetime management with OnCloseQuery, OnClose events and Release method.

 

Introduction

 

The main control of the LMD-DockingPack is the TLMDDockSite. You can find it on the “LMD Docking” page of the Delphi component palette. The control implements advanced dock site functionality. Generally, the application has only one TLMDDockSite control placed on the whole client area (Align = alClient) of the main application form:

 

 

The site itself can’t contain useful application related controls directly; instead all application related visual controls should be places on dock panel controls, e.g. TLMDDockPanel instances. To add new dock panel to the site, right-click the site control in the Delphi form designer and use New Panel items from the shown popup menu:

 

 

For simplicity: the process of adding new panels on the site is analogous to adding new pages to standard Vcl TPageControl control. In latest Delphi IDE version it is also possible to add new dock panel interactively, by dragging “New Dock Panel” item from “LMD Docking” page of Delphi’s component palette:

 

 

After panels have been places on the site it can be rearranged at design-time. You can change the site’s layout by dragging the panels; click-and-drag the panel header to initiate layout rearrangement. You can also use splitters to resize dock panels on the site, or click site’s tabs to change active tabs:

 

 

Generally, an application contains more dock panels than initially shown at application start, so some panels can be hidden at design-time by clicking on “close” header button or assigning False to PanelVisible property.

Hidden panels are not visible even at design-time, so to show it back, select it in the Delphi Object TreeView, or set PanelVisible property to True using Delphi Object Inspector.

Note that hidden panels are still docked in the site and will take its old place when will be shown next time.

 

At run-time, the layout of the application can be changed using drag-and-dock, by dragging the dock panels by its header. As opposed to design-time, at run-time the dock panel is not statically associated with its parent site and can be dragged out to some another site, or become “floating”. As you can see, floating sites can generally contain more then one docking panel:

 

 

Application code should use standard Show method to ensure that the panel is visible to end-user. Calling Show method of the panel will not only change its PanelVisible property, but also force the site to show the panel:

If the panel resides in tabs, then the site will make panel’s tab active;

If the panel is “auto hidden”, then the site will shift the panel to show it;

If the panel is “floating” and hidden at the same time, then the floating panel’s window will be shown.

 

The LMD-DockingPack is implemented on top of standard Vcl docking system and thus compatible with it. So, actually dock panels can be docked into any standard Delphi dock sites, such as TPanel, TForm or TPageControl. Also, any standard Delphi dock client can be docked into the TLMDDockSite control. While docking, standard Delphi clients are placed on the dynamically created TLMDDockPanel panels. Note that such a host-panel is not considered as a dock client of the site and will not be found in DockClients collection.

 

However, standard sites or clients can’t take all advantageous of LMD-DockingPack, so we do not recommend using it.

But, some standard docking related utilities in Vcl are still should be used:

The ManualDock and ManualFloat methods of TControl are fully supported. Actually, the ManualFloat method is the only way to make dock panel “floating”. See also the description of the TLMDDockSite.DockControl method.

Standard HostDockSite property of the TControl can be used to retrieve the current dock site of the dock panel. See also the description of the TLMDDockPanel.Site property

The Floating property of the TControl. Can also be used to retrieve whether the dock panel is “floating”. However note, that if more then one dock panel has been docked in the same floating window, they all will be considered as docked, not “floating”; so in this case the Floating property will return False.

The DockClientCount and DockClients properties of TWinControl can also be used to iterate through site clients. See also the description of the TLMDDockSite.Panels and TLMDDockSite.PanelCount properties.

UndockWidth ans UndockHeight properties can be used to set/change a control floating size.

 

Except advanced dock site the LMD-DockingPack introduces following enhancements (comparing to standard Delphi docking features):

Transparent blue dragging rectangle is shown instead of standard Delphi contour drag rectangle. The rectangle is able to paint schematic tab at the bottom in some cases. This way is also more compatible with Windows Vista/7 desktop composition.

The ability to dock into floating window more then one dock panel, so allowing making complex floating windows.

The “drag window content” mode in which exact floating window is dragged (with all  its content) instead of schematic drag rectangle.

The ability to save/load docking layout, including floating windows. See description below.