Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxZone.ValidateDockZone(TdxCustomDockControl,TdxCustomDockControl) Method

Returns a value indicating whether a zone of this type should be added to the control’s dock zones list.

#Declaration

Delphi
class function ValidateDockZone(AOwner: TdxCustomDockControl; AControl: TdxCustomDockControl): Boolean; virtual;

#Parameters

Name Type
AOwner TdxCustomDockControl
AControl TdxCustomDockControl

#Returns

Type
Boolean

#Remarks

Each time the layout of dock controls is changed, dock controls recalculate their dock zones lists. Each control adds its own zones to the list and scans all of its parents to add their zones to the list. Zones of parent controls are added with a smaller width, thus docking is allowed either to the control itself or to one of its parent controls. In other words, the closer the mouse pointer is to the edge of the control, the higher the dock level of the target dock control.

The ValidateDockZone method is called to determine whether the parent’s zone (of the current type) must be added to the control. The AControl parameter specifies the control whose dock zones list is recalculated. The AOwner parameter specifies the control whose dock zones are checked for validity. Note that these two parameters may coincide. This means that the control checks its own zone for validity. Otherwise, a zone of the control’s parent is checked.

The method returns True if the dock zone type is allowed by the AllowDockClients property of the zone owner and if the control doesn’t already contain a zone providing the same docking functionality. If True is returned, the checked zone is added to the list.

You can also use the ValidateDockZone method when filling the dock zones lists manually. Note that you should handle the OnUpdateDockZones event of a dock control to update this list yourself.

See Also