Skip to main content

TdxZone Class

Serves as the base for classes representing dock zones and resize zones.

Declaration

TdxZone = class(
    TObject
)

Remarks

Each dock control stores lists of its dock zones and resize zones in its DockZones and ResizeZones properties. These zones are TdxZone class descendants that store information about where other controls can be docked to it and where resizing can be initiated. Also, they provide the functionality to implement these two kinds of operation. This includes specifying the dimensions and painting docking frames, resizing bars and initiating docking & resizing operations. Please refer to the Zones Overview topic for the list of the TdxZone class descendants and the overview of their functionality.

Dock zones and resize zones are recalculated each time the layout of dock controls changes. Thus, if you change the DockZones and ResizeZones property values manually, the changes will be lost following the next layout update. However, dock controls provide the OnUpdateDockZones and OnUpdateResizeZones events. You can handle them to update zone lists each time they are recalculated. Thus, you can provide custom docking and resizing behavior of controls by modifying these lists. Please refer to the Dock Zones and Resize Zones topics for examples.

Most of the methods declared by the TdxZone class are overridden by its descendants to provide proper zone behavior. You can also create a custom zone by deriving it from an appropriate zone object and by overriding the desired methods. The descendants created can then be added to the zone lists of a dock control.

Objects representing dock zones and resize zones are passed to a number of events as parameters. You can read zone properties values to obtain information about the current operation. For instance, settings of dock zones may be used to obtain the docking type. Settings of resize zones can be used to determine whether horizontal or vertical resizing is performed.

Inheritance

TObject
TdxZone
See Also