Bounds

Qualified name: delphifmx.Bounds

class Bounds

Bases: Persistent

Specifies the bounds for a control. TBounds is used in the Margins and Padding properties of TControl and its descendants. TBounds help define the relative position between components on a form, and between the edges of the form and the component. For example, when you set the left bound for a component to 10 pixels, the component will not come closer than 10 pixels to the edge of the container, or to another component on the left edge. The number of pixels by which two components are separated is the sum of the pixels of both components. You can define the amount of margin that should surround the component on the Top, Left, Bottom, or Right by changing the pixel value for the Margins and Padding properties in the Object Inspector. Margins and Padding depend on the Align property. To see the effect, set the Margins property on a parent control and set the Align property for the child control to vaClient.

Methods

Assign

Assigns to this object the values of another TPersistent object

Empty

Returns True if either the Width or Height of the Rect are empty, and False otherwise.

Equals

Checks whether the current instance and the Obj parameter are equal.

GetNamePath

Returns the name of the object as it appears in the Object Inspector.

Height

Returns the height of the Rect, as the difference between the Bottom and Top values.

MarginEmpty

Returns True when the Left, Right, Top, and Bottom properties are simultaneously 0.

MarginRect

Returns a rectangle defined by the current Rect property and the R parameter.

PaddingRect

Returns a rectangle defined by the current Rect property and the R parameter.

ToString

Returns a string containing the class name.

Width

Returns the width of the Rect, as the difference between the Right and Left values.

Attributes

Bottom

Specifies the bottom edge of the margin.

ClassName

Returns the TObject.ClassName

DefaultValue

Specifies the default value for the margins.

Left

Specifies the left edge of the margin.

Rect

Provides access to the rect of a control

Right

Specifies the right edge of the margin.

Top

Specifies the top edge of the margin.

Assign(persistent)

Assigns to this object the values of another TPersistent object

Bottom

Specifies the bottom edge of the margin. Use the Bottom property to set and get the bottom edge of the margin.

Type:

float

DefaultValue

Specifies the default value for the margins. DefaultValue is automatically set when creating the TBounds instance.

Type:

RectF

Empty()

Returns True if either the Width or Height of the Rect are empty, and False otherwise.

Equals(Obj: Object) bool

Checks whether the current instance and the Obj parameter are equal. FMX.Types.TBounds.Equals inherits from System.TObject.Equals. All content below this line refers to System.TObject.Equals. Checks whether the current instance and the Obj parameter are equal. The function has one Obj parameter of the TObject type. By default, the Equals method shows whether the addresses corresponding to the current object and the Obj object are identical. The method returns a boolean value that represents the equality between the two addresses.

Note: Equals is supposed to be overridden in user-derived classes, to provide consumer objects with an equality determining function. For example, in the FMX.Types.TBounds class, Equals also returns True if the Rect properties of the current object and of the Obj object are equal. In the FMX.StdActns.TBaseValueRange class, Equals also returns True if all the properties of the current object and of the Obj object are equal.

GetNamePath()

Returns the name of the object as it appears in the Object Inspector.

Height()

Returns the height of the Rect, as the difference between the Bottom and Top values.

Left

Specifies the left edge of the margin. Use the Left property to set and get the left edge of the margin.

Type:

float

MarginEmpty()

Returns True when the Left, Right, Top, and Bottom properties are simultaneously 0.

MarginRect(R: RectF) RectF

Returns a rectangle defined by the current Rect property and the R parameter. The MarginRect function returns a rectangle calculated by adding the Left and Top values and subtracting the Right and Bottom values of the current Rect to or from the corresponding values of the R rectangle. For example, if the current Rect is (10, 20, 50, 30) and R is (20, 10, 40, 50), the result of MarginRect is (30, 30, -10, 20). See also Margins.

PaddingRect(R: RectF) RectF

Returns a rectangle defined by the current Rect property and the R parameter. The PaddingRect function returns a rectangle calculated by adding the Left and Top values and subtracting the Right and Bottom values of the current Rect to or from the corresponding values of the specified R rectangle. For example, if the current Rect is (10, 20, 50, 30) and R is (20, 10, 40, 50), the result of PaddingRect is (30, 30, -10, 20). See also Padding.

Rect

Provides access to the rect of a control

Right

Specifies the right edge of the margin. Use the Right property to set and get the right edge of the margin.

Type:

float

ToString()

Returns a string containing the class name. FMX.Types.TBounds.ToString inherits from System.TObject.ToString. All content below this line refers to System.TObject.ToString. Returns a string containing the class name. By default, the ToString returns a string containing the class name of the instance that is being called. For example, calling ToString on a TButton instance returns a string containing “TButton”.

Note: ToString is intended to be overridden in user-derived classes, to provide consumer objects with a string representation.

Top

Specifies the top edge of the margin. Use the Top property to set and get the top edge of the margin.

Type:

float

Width()

Returns the width of the Rect, as the difference between the Right and Left values.