FMX.Types.TAlignLayout

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TAlignLayout = (None, Top, Left, Right, Bottom, MostTop, MostBottom, MostLeft, MostRight, Client, Contents, Center, VertCenter, HorzCenter, Horizontal, Vertical, Scale, Fit, FitLeft, FitRight);

C++

enum class DECLSPEC_DENUM TAlignLayout : unsigned int { None, Top, Left, Right, Bottom, MostTop, MostBottom, MostLeft, MostRight, Client, Contents, Center, VertCenter, HorzCenter, Horizontal, Vertical, Scale, Fit, FitLeft, FitRight };

Properties

Type Visibility Source Unit Parent
enum public
FMX.Types.pas
FMX.Types.hpp
FMX.Types FMX.Types

Description

Specifies the alignment of a control within its parent.

TAlignLayout specifies how a control is placed relative to its parent. The automatic alignment of a control can affect its position, size (height and width), and anchors. If the parent's size changes, the control changes to keep the automatic alignment within the parent.

The Margins property of the parent affects the control's automatic alignment within it. The only alignment values that are not affected are None and Contents.

To set the alignment of a control, use its Align property.

Note: The automatic alignment can set some anchors as True. The anchors set by the automatic alignment to True are excluded. Explicitly setting the anchors modified by automatic alignment has no effect over the control.

TAlignLayout can have one of the following values:

Value Meaning

Bottom

The control moves and pins to the bottom of its parent and resizes to fill the width of its parent. The height of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent.
The anchors are set to [akLeft,akBottom,akRight].

Center

The control moves to the center of the parent area. The control's size is not affected. If another side-pinned control already occupies part of the parent area, the control moves to the center of the remaining parent area.
The control is not anchored to its parent.

Client

The control resizes to fill the client area of its parent. If another side-pinned control already occupies part of the parent area, the control resizes to fit within the remaining parent area.
The anchors are set to [akLeft,akTop,akRight,akBottom].

Contents

The control resizes to fill the entire bounds of its parent, overlapping it.
The anchors are set to [akLeft,akTop,akRight,akBottom].

Fit

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to the center of the parent area.
The anchors are set to [akLeft,akTop,akRight,akBottom].

FitLeft

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to and pins to the left side of the parent.
The anchors are set to [akLeft,akTop,akRight,akBottom].

FitRight

The control resizes to fit the parent area, preserving its aspect ratio. The control moves to and pins to the right side of the parent.
The anchors are set to [akLeft,akTop,akRight,akBottom].

Horizontal

The control resizes to fill the width of its parent. The height of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent.
The anchors are set to [akLeft,akRight].

HorzCenter

The control is centered horizontally within the client area of the parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akTop,akBottom].

Left

The control moves and pins to the left side of its parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akLeft,akTop,akBottom].

MostBottom

The control moves and pins to the bottom of its parent, set to be the bottommost, and resizes to fill the width of its parent. The height of the control is not affected.
The anchors are set to [akLeft,akRight,akBottom].

MostLeft

The control moves and pins to the left side of its parent, set to be the leftmost, and resizes to fill the height of its parent. The width of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akLeft,akTop,akBottom].

MostRight

The control moves and pins to the right side of its parent, set to be the rightmost, and resizes to fill the height of its parent. The width of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akTop,akRight,akBottom].

MostTop

The control moves and pins to the top of its parent, set to be the topmost, and resizes to fill the width of its parent. The height of the control is not affected.
The anchors are set to [akLeft,akTop,akRight].

None

The control remains where it was placed. This is the default value. No automatic positioning and sizing are performed.
The anchors are set to [akLeft,akTop].

Right

The control moves and pins to the right side of its parent and resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akRight,akTop,akBottom].

Scale

The control resizes and moves to maintain the relative position and size as its container resizes.
The anchors are set to [akLeft,akTop,akRight,akBottom].

Top

The control moves and pins to the top of its parent and resizes to fill the width of its parent. The height of the control is not affected. If another most side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent.
The anchors are set to [akLeft,akTop,akRight].

VertCenter

The control is centered vertically within the client area of the parent and resizes to fill the width of its parent. The height of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining width of its parent.
The anchors are set to [akLeft,akRight].

Vertical

The control resizes to fill the height of its parent. The width of the control is not affected. If another side-pinned control already occupies part of the parent area, the control resizes to fill the remaining height of its parent.
The anchors are set to [akTop,akBottom].

See Also