FmxObject

Qualified name: delphifmx.FmxObject

class FmxObject

Bases: Component

The base class for FireMonkey components. TFmxObject extends TComponent to provide low-level functionality to FireMonkey components, including:

Creating, destroying, and releasing objects Cloning, storing, and loading objects from a stream Child object manipulations (add, remove, search) Free notifications Support for FireMonkey styles Support for FireMonkey animations

Methods

AddFreeNotify

Adds AObject to the list of objects to be notified when this TFmxObject is destroyed.

AddObject

Adds the AObject object to the Children list of children attached to this parent object (self).

AddObjectsToList

Adds the children of this object to the given list.

AnimateColor

AnimateFloat

AnimateFloatDelay

AnimateFloatWait

AnimateInt

AnimateIntWait

BeforeDestruction

Performs any necessary actions before the first destructor is called.

BringChildToFront

Embarcadero Technologies does not currently have any additional information.

BringToFront

Brings this FMX visual object on top of other overlapping visual controls that are on the same form.

Clone

Returns a new cloned instance of this FMX object.

ContainsObject

Returns True if the specified object is a direct child.

DeleteChildren

Deletes all the children of this FMX object.

EnumObjects

Loops through the children of this object, and runs the specified procedure once per object as the first parameter in each call.

Exchange

Exchanges two objects from the children list.

FindStyleResource

Returns the style resource object with the specified (AStyleLookup).

GetParentComponent

Returns the containing component.

HasParent

Verifies whether the component has a parent.

InsertObject

Adds the object provided in the parameter to the FChildren TList of this object (self), at the specified position (index).

IsChild

Returns True if the specified object is a child.

ObjectState

Release

Warning: Release is deprecated.

Released

RemoveFreeNotify

Removes the given object from the free notifications list.

RemoveObject

Removes a children object from its parent.

SendChildToBack

Embarcadero Technologies does not currently have any additional information.

SendToBack

Sends this FMX visual object to the background letting other overlapping visual controls that are on the same form to be on top of it.

SetDesign

Sets the csDesigning in TComponentState.

SetRoot

Sets the Root property of each child in the children list.

Sort

Sorts the children in the children list using the specified sorting procedure.

StopPropertyAnimation

Stops the animation of the specified property of this FMX object.

Attributes

ActionClient

Specifies whether the component object has an associated action.

Children

Stores an array of children attached to this parent component.

ChildrenCount

Read-only property that specifies the number of children in the children list.

ClassName

Returns the TObject.ClassName

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Returns the owned component count

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

Returns an iterator over the owned components

Data

Stores a Tvalue, which is a data structure that can store different kinds of data types.

DesignInfo

Contains information used by the Form designer.

Index

Specifies the index of the child object in the children array attached to this object.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

Owner

Returns the Component Owner

Parent

Returns/Sets the Control Visibility

Root

Specifies the root parent of this object.

Stored

Specifies whether this object is stored in the .XFM file.

StyleName

Specifies the style name for this FMX component.

Tag

Stores a NativeInt integral value as a part of a component.

TagFloat

Custom property that stores any floating-point value.

TagObject

Custom property that stores any object value.

TagString

Custom property that stores any string value.

VCLComObject

Represents information used internally by components that support COM.

ActionClient

Specifies whether the component object has an associated action. If ActionClient is True, this component object is the client of an associated action. If ActionClient is False, this component object is not the client of an action. This property can be checked before calling GetActionLinkClass.

Type:

bool

AddFreeNotify(AObject: IFreeNotification) None

Adds AObject to the list of objects to be notified when this TFmxObject is destroyed. The AObject parameter can be any object that implements the IFreeNotification interface, such as a TBrushResource, or a TBrushBitmap.

AddObject(AObject: FmxObject) None

Adds the AObject object to the Children list of children attached to this parent object (self). AddObject internally calls DoAddObject that implements all business functionality of AddObject. AddObject adds the object provided in the AObject parameter to the list of children stored in the Children property of this object (self). AddObject changes the parent of AObject to this object (self) and sets the root of AObject to the Root object of this object (self). Descendant classes, like TCommonCustomForm and TControl, additionally handle tab stop lists keeping ordered lists of objects to which the user can tab. If such descendant class supports the ITabStopController interface and AObject is an object of a class supporting the IControl interface, then AddObject of this descendant adds AObject to the TabList tab stop lists of the (self) object.

AddObjectsToList(AList: List<FMX.Types.TFmxObject>) None

Adds the children of this object to the given list. The AddObjectsToList method adds all objects that are owned by this object (stored in the Children field) and all of the objects owned by them to the TList provided in the AList parameter.

AnimateColor(APropertyName: str, NewValue: int, Duration: float, AType: AnimationType, AInterpolation: InterpolationType) None
AnimateFloat(APropertyName: str, NewValue: float, Duration: float, AType: AnimationType, AInterpolation: InterpolationType) None
AnimateFloatDelay(APropertyName: str, NewValue: float, Duration: float, Delay: float, AType: AnimationType, AInterpolation: InterpolationType) None
AnimateFloatWait(APropertyName: str, NewValue: float, Duration: float, AType: AnimationType, AInterpolation: InterpolationType) None
AnimateInt(APropertyName: str, NewValue: int, Duration: float, AType: AnimationType, AInterpolation: InterpolationType) None
AnimateIntWait(APropertyName: str, NewValue: int, Duration: float, AType: AnimationType, AInterpolation: InterpolationType) None
BeforeDestruction()

Performs any necessary actions before the first destructor is called. FMX.Types.TFmxObject.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.

BringChildToFront(Child: FmxObject) None

Embarcadero Technologies does not currently have any additional information.

BringToFront()

Brings this FMX visual object on top of other overlapping visual controls that are on the same form. You can call BringToFront at run time as in the following code snippet:

Label1.BringToFront;

or, at design time, by right-clicking the FMX visual control and selecting Control > Bring to Front from the pop-up menu.

Children

Stores an array of children attached to this parent component. Use the Children property to access each of the children attached to this parent component.

Type:

FmxChildrenList

ChildrenCount

Read-only property that specifies the number of children in the children list.

Type:

int

Clone(AOwner: Component) FmxObject

Returns a new cloned instance of this FMX object. Clone internally creates and returns a new FMX object that is an exact copy of this object.

Note: The class you want to clone must be registered and be a descendant of TFmxObject. Use RegisterClass or RegisterFMXClasses for your components.

ContainsObject(AObject: FmxObject) bool

Returns True if the specified object is a direct child. ContainsObject returns True if the specified object (AObject) is a direct child of this TFmxObject (self). It returns False otherwise. Unlike IsChild, ContainsObject only returns True when passed a direct child of this object as AObject. For example, if A is a direct child of this object, and B is a direct child of A, ContainsObject returns True when passed A as AObject, but it returns False when passed B.

Data

Stores a Tvalue, which is a data structure that can store different kinds of data types. Data has no predefined meaning. Although Data is used for LiveBinding, any succesor override this behavior. Then, the behaviour of Data is based on the type of its value.

Note: Do not use this member. It is for internal use only.

Type:

Value

DeleteChildren()

Deletes all the children of this FMX object. DeleteChildren checks whether Children is assigned (children are present) and, if so, it deletes all of them. DeleteChildren also sets Children to nil.

EnumObjects(Proc: Func<FMX.Types.TFmxObject, FMX.Types.TEnumProcResult>) None

Loops through the children of this object, and runs the specified procedure once per object as the first parameter in each call.

Exchange(AObject1: FmxObject, AObject2: FmxObject) None

Exchanges two objects from the children list. Exchange exchanges AObject1 with AObject2.

FindStyleResource(AStyleLookup: str, AClone: bool) FmxObject

Returns the style resource object with the specified (AStyleLookup). If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks for the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True).

GetParentComponent()

Returns the containing component. FMX.Types.TFmxObject.GetParentComponent inherits from System.Classes.TComponent.GetParentComponent. All content below this line refers to System.Classes.TComponent.GetParentComponent. Returns the containing component. GetParentComponent returns a reference to the component that contains the current component, or nil if there is no container. Use HasParent to determine whether a component has a containing component. For example, a button on a panel on a form returns the panel, the panel returns the form, and the form returns nil.

HasParent()

Verifies whether the component has a parent. FMX.Types.TFmxObject.HasParent inherits from System.Classes.TComponent.HasParent. All content below this line refers to System.Classes.TComponent.HasParent. Verifies whether the component has a parent. Call HasParent to determine whether a specific component has a parent. Derived classes override this method to implement proper handling for parenting. Use GetParentComponent to retrieve the component reference.

Index

Specifies the index of the child object in the children array attached to this object.

Type:

int

InsertObject(Index: int, AObject: FmxObject) None

Adds the object provided in the parameter to the FChildren TList of this object (self), at the specified position (index). The InsertObject method is similar to the AddObject method, except that InsertObject inserts the given object to the given position specified by the Index parameter.

IsChild(AObject: FmxObject) bool

Returns True if the specified object is a child. IsChild returns True if the specified object (AObject) is a child of this TFmxObject (self) or any of its children, grand-children, etc. It returns False otherwise. Unlike ContainsObject, IsChild not only returns True when passed a direct child of this object as AObject, but also when the specified object is a grand-child, grand-grand-child, and so on of this object. For example, if A is a direct child of this object, and B is a direct child of A, IsChild returns True both when passed A as AObject and when passed B.

ObjectState() FmxObject.TObjectState
Parent

Returns/Sets the Control Visibility

Release()

Warning: Release is deprecated.

Marks this TFmxObject object for delayed deletion.

Released() Boolean
RemoveFreeNotify(AObject: IFreeNotification) None

Removes the given object from the free notifications list. The RemoveFreeNotify method removes the object specified through the AObject parameter, which is of type TFmxObject.

Tip: If you want to use RemoveFreeNotify on an object, that object must have been added to the free notifications list using the AddFreeNotify method.

RemoveObject(AObject: FmxObject) None

Removes a children object from its parent. Calling RemoveObject is equivalent to setting Parent to nil. RemoveObject has two overloaded methods. The first one removes the object specified through the AObject parameter, which is of type TFmxObject. The second one removes the object whose index is specified through the Index parameter.

Tip: If you want to use RemoveObject on an object, that object must have been added to the children list through the AddObject method. Removes a children object from its parent. Calling RemoveObject is equivalent to setting Parent to nil. RemoveObject has two overloaded methods. The first one removes the object specified through the AObject parameter, which is of type TFmxObject. The second one removes the object whose index is specified through the Index parameter.

Tip: If you want to use RemoveObject on an object, that object must have been added to the children list through the AddObject method.

Root

Specifies the root parent of this object. The Root property is a link to the root parent of this object. By default, the root object is the youngest parent in the hierarchy of the object parents, which supports the IRoot interface. If no parent supports IRoot, then Root = nil. Notice that a Root object provides the Focused, Hovered, and Captured properties. Therefore, among the Children of the Root object, at each moment, there can only be one:

Focused control. Control that has captured the mouse. Control over which the mouse is hovering.

Type:

IRoot

SendChildToBack(Child: FmxObject) None

Embarcadero Technologies does not currently have any additional information.

SendToBack()

Sends this FMX visual object to the background letting other overlapping visual controls that are on the same form to be on top of it. You can call SendToBack at run time as in the following code snippet:

Label1.SendToBack;

or, at design time by right-clicking the FMX visual control and selecting Control > Send To Back from the pop-up menu.

SetDesign(Value: bool, SetChildren: bool) None

Sets the csDesigning in TComponentState. Used internally by the IDE.

SetRoot(ARoot: IRoot) None

Sets the Root property of each child in the children list.

Sort(Compare: FmxObjectSortCompare) None

Sorts the children in the children list using the specified sorting procedure.

StopPropertyAnimation(APropertyName: str) None

Stops the animation of the specified property of this FMX object. StopPropertyAnimation iterates through all the children of this FMX object and, if one of them is of type TFloatAnimation or TColorAnimation and is assigned to the specified property (APropertyName), stops the animation.

Stored

Specifies whether this object is stored in the .XFM file. Set the Stored property to True to store the object in the .XFM file. Otherwise, set Stored to False.

Type:

bool

StyleName

Specifies the style name for this FMX component. Read or set the StyleName property to obtain or to set the name of the style for this FireMonkey component. For instance, a TRectangle object can have StyleName set to ‘backgroundstyle’ or ‘panelstyle’.

Type:

str

TagFloat

Custom property that stores any floating-point value.

Type:

float

TagObject

Custom property that stores any object value.

Type:

Object

TagString

Custom property that stores any string value.

Type:

str