Sign in Join
FPDoc Onlineexperiment

TCustomForm.DoDock procedure

Member of TCustomFormprotectedIn unit Forms

Docks or undocks the form in the specified dock site.

Declaration

pascal
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override

Arguments

NewDockSite

New dock site for the form instance.

ARect

Rectangle with the bounds for the new dock site after resizing and alignment.

Description

DoDock is an overridden method used to dock / undock the form instance in the dock site specified in NewDockSite. When NewDockSite is unassigned (contains Nil), the form instance is undocked from the host dock site.

ARect contains the bounds for the new dock site after resizing and alignment (when needed).

When a form is docked, its BorderStyle is set to bsNone. DoDock ensures that the value in the BorderStyle property is saved or restored for the form when the value in HostDockSite is changed. If NewDockSite has been assigned, the value in BorderStyle is saved to an internal member. If NewDockSite is Nil, the value in BorderStyle is restored from the internal member.

Changes needed for the Align property must be handled in the DockManager.

DoDock calls the inherited method prior to exit.

DoDock is called from the Dock method in an ancestor class.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.