FMX.Controls.TControl.BoundsRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property BoundsRect: TRectF read GetBoundsRect write SetBoundsRect;

C++

__property System::Types::TRectF BoundsRect = {read=GetBoundsRect, write=SetBoundsRect};

Properties

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

Description

Specifies the bounding rectangle of the control.

The coordinates of the upper-left corner of the bounding rectangle are X and Y coordinates of the control Position. The coordinates of the lower-right corner are X+Width and Y+Height.

For example:

R:=Control.BoundsRect;

The coordinates of the R rectangle are:

R.Left = Control.Position.X;
R.Top = Control.Position.Y;
R.Right = Control.Position.X + Control.Width;
R.Bottom = Control.Position.Y + Control.Height;

When BoundsRect is set, the Position property is set to be the upper-left corner of the given bound rectangle, and the Width and Height of the control receive the values of the width and height of the given bound rectangle. For example:

Control.BoundsRect:=R;

The controls have the following properties:

Control.Position.X= R.Left;
Control.Position.Y= R.Top;
Control.Width= R.Width;
Control.Height= R.Height;

See Also