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

TdxDockingController.DockControls Property

Provides indexed access to all dock controls in the application.

#Declaration

Delphi
property DockControls[Index: Integer]: TdxCustomDockControl read;

#Property Value

Type
TdxCustomDockControl

#Remarks

Use this property to access dock controls. This property can be used in combination with the DockControlCount property to traverse through all the dock controls in the application. The index of the first available dock control is 0. The last dock control’s index is the DockControlCount property value decremented by 1.

The following sample code traverses the dock controls to find all tab containers and to set them all to show tabs at the top:

Delphi
var
  I: Integer;
  TabContainers: TList;
  TabContainer: TdxTabContainerDockSite;
// ...
TabContainers := TList.Create;
try
  for I := 0 to dxDockingController.DockControlCount - 1 do
  begin
    if dxDockingController.DockControls[I] is TdxTabContainerDockSite then
      TabContainers.Add(dxDockingController.DockControls[I]);
  end;
  for I := 0 to TabContainers.Count - 1 do
  begin
    TabContainer := TabContainers.Items[I];
    TabContainer.TabsPosition := tctpTop;
  end;
finally
  TabContainers.Free;
end;
See Also