Skip to main content

Docking Manager Features

  • 3 minutes to read

The docking manager (TdxDockingManager) provides centralized control over the appearance and behavior of all dock controls in an application. Refer to the When to Use the Docking Manager topic for a brief overview of its benefits and an explanation as to when you may wish to incorporate it into your application. This topic provides a description of the docking manager’s features in detail.

Generic Appearance Settings


The docking manager provides a number of properties that affect the appearance of dock controls in an application. The image below shows these properties in the Object Inspector window.

The Color and Font properties specify the color and font used to paint dock controls whose ManagerColor and ManagerFont properties are set to True. Note that True is the default value for these properties. With them, you can provide a common appearance for all controls using only the docking manager’s properties.

The Images property represents the source of images for dock controls. You should assign a TImageList component to this property. Once an image list has been assigned, you can associate dock controls with images using the ImageIndex property of the controls.

Finally, the LookAndFeel property specifies the painting style of dock controls. All controls in the application are painted as specified by these two properties. Please refer to the Paint Styles topic for more information on painting styles and examples.

Docking Options


The docking manager provides an Options property which represents a set of options affecting docking operations and other functionality for dock controls. For instance, they specify whether different kinds of containers can reside within other containers, whether double-click docking operations are allowed and the behavior of caption buttons. Please refer to the property descriptions for details on each option.

Default Settings of Dynamically Created Sites


Docking operations imply that dock controls are created dynamically. For instance, a tab container or a side container can be dynamically created when docking one panel to another. The docking manager provides a number of properties that specify default settings of dynamically created controls. The image below shows these properties in the Object Inspector window.

For instance, you may need tab containers to be created with tabs located at the top. For this purpose, expand the DefaultTabContainerSiteProperties property and set its TabPosition attribute to tpTop. Note that changing this property will not affect existing tab containers. This will be applied to the newly created containers only.

The specified default settings are only applied to controls if the UseDefaultSitesProperties property value is True (the default behavior).

Events


Most events provided by the docking manager duplicates events provided by dock controls. Thus, you will not have to assign the same event handler to dock controls. Instead you can assign a handler to a docking manager’s event.

The docking manager also provides two unique events. The OnActiveDockControlChanged event fires each time the active dock control changes. The OnViewChanged event notifies whether changes have been made to the painting style applied to controls.

One other unique event is the OnLayoutChanged. This event fires immediately after changing the layout of dock controls in the application. Handle this event if you need to provide a common response to docking operations.

See Also