FMX.Controls.TControl.SetBounds

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetBounds(X, Y, AWidth, AHeight: Single); virtual;

C++

virtual void __fastcall SetBounds(float X, float Y, float AWidth, float AHeight);

Properties

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

Description

Sets the boundaries of the current control.

Use SetBounds to change all of the boundary properties of the control at one time.

X specifies the X coordinate of the Position of the control.

Y specifies the Y coordinate of the Position of the control.

AWidth specifies the value of the Width of the control.

AHeight specifies the value of the Height of the control.

The same effect can be achieved by setting the Position, Width, and Height properties separately, but SetBounds changes all properties at once, ensuring that the control will not repaint between changes.

After setting the boundary properties, SetBounds specifies to the control to maintain the alignment of the control within its parent and of its children within it. The given parameter does not necessarily reflect in the Position, Width, and Height properties. The properties can be updated when the alignment is applied.

See Also

Code Examples