[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TCustomForm.DoDock

Docks or undocks the form in the specified dock site.

Declaration

Source position: forms.pp line 689

protected procedure TCustomForm.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.

Remark: 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

TCustomForm.BorderStyle

  

The border style affects the title bar, border and resize behavior of the form.

TControl.Dock

  

Moves the control into a new docksite.

TControl.DoDock

  

Adjusts the control position and extent for the new docksite.

TControl.HostDockSite

  

The host site (TWinControl) into which this control is docked. Nil if not docked.


Version 3.2 Generated 2024-02-25 Home