TClrCustomControl.Anchors Property

Specifies how the control is anchored to its parent.

Namespace: CNClrLib.Control.Base
 property Anchors;

Property Value

Type: Void


Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored.

If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft, akRight], the control stretches when the width of its parent changes.