FMX.Layouts.TScrollBox.Margins

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Margins: TBounds read GetMargins write SetMargins;

C++

__property Margins;

Properties

Type Visibility Source Unit Parent
property published
FMX.Layouts.pas
FMX.Layouts.hpp
FMX.Layouts TScrollBox

Description


Aligns the component to the margins points of other components.

FMX.Layouts.TScrollBox.Margins inherits from FMX.Controls.TControl.Margins. All content below this line refers to FMX.Controls.TControl.Margins.

Aligns the component to the margins points of other components.

The Margins of a control are the distances (in pixels) from each edge (top, left, bottom, right) to another control within the same Parent or to the edge of its Parent. The Margins add space to the outer side of the control. It only applies for controls that do not use TAlignLayout None and the components are located to each other.

If a margin is not 0, no other control will come closer to the control than the specified distance. If the distance from a Parent edge to the corresponding control edge is smaller than the specified Margins for that edge, the control is repositioned and resized, if necessary, to maintain the specified distance.

If the Margins control has zero values, RAD Studio uses the default values (Left=4, Top=4, Right=4, Bottom=4). You can also set your own Margins values. It only applies to the IDE control's guidelines, when you are dragging control. But if you use Align=Client (for example), it will use the specified values in Margins.

The following image shows how Padding and Margins properties affect alignment, position, and size of controls.

Margins Padding Control.png

See Also