FMX.Controls.TControl.Margins

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Margins: TBounds read GetMargins write SetMargins;

C++

__property Fmx::Types::TBounds* Margins = {read=GetMargins, write=SetMargins};

Properties

Type Visibility Source Unit Parent
property public
FMX.Controls.pas
FMX.Controls.hpp
FMX.Controls TControl

Description

Specifies the control's margins.

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. Margins adds space to the outer side of the control.

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.

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

Margins Padding Control.png

See Also