[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
The set of anchor definitions for this control.
Source position: controls.pp line 1795
public property TControl.Anchors : TAnchors |
Anchors is a TAnchors property which contains the edges used to align the position of the control relative to its Parent. Anchors allow the control to be repositioned and/or resized when the parent control is resized. Coordinate values in the control - like Left, Top, Bottom, and Right properties - are updated when the corresponding edge is anchored to its Parent.
The default value for the property is [akLeft, akTop], and indicates that only the Top and Left coordinates are anchored in the parent control.
For example:
Setting a new value for the property causes the UpdateAnchorRules and AdjustSize methods to be called.
Values in Anchors are used (along with Align) in the DoAutoAdjustLayout method. They control whether values in Left, Top, Bottom, and Right are calculated using the ClientWidth and ClientHeight for the Parent control. The values in Anchors also used in the HeightIsAnchored and WidthIsAnchored methods.
Values in Anchors may be updated when a new value is assigned to the Align property which conflicts with the existing values in the property. They may also be updated when values are assigned to AnchorSide which cause vertical or horizontal centering to a sibling control (AnchorVerticalCenterTo, AnchorHorizontalCenterTo) or alignment to a companion control (AnchorToCompanion).
|
Set type used to store values from the TAnchorKind enumeration. |
|
|
The control side to be anchored. |
|
|
Specifies the placement of the control on its Parent control. |
|
|
Array of anchor definitions, indexed by the control sides. |
|
|
Smart way to DoAutoSize. |
|
|
Applies layout changes using the specified policy and scaling proportions to the control. |
|
|
The height for the client area on the control. |
|
|
The width of the client area for the control. |
|
|
The control within which the control is shown. |
Version 3.2 | Generated 2024-02-25 | Home |