Classes.TComponent.ComponentIndex

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Classes.pas

	property ComponentIndex: Integer read GetComponentIndex write SetComponentIndex;


Unit: Classes

Type: property

Visibility: public

Member Of: TComponent

C++ Information

From Classes.hpp

	__property int ComponentIndex = {read=GetComponentIndex,write=SetComponentIndex};


Unit: Classes

Type: property

Visibility: public

Member Of: TComponent

Description

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


Use ComponentIndex when iterating through the Components list of the component's owner to perform some action on owned components. It can be used in conjunction with ComponentCount. ComponentIndex is used internally for iterative assignment procedures.

Note:  The first component in the list has a ComponentIndex value of 0, the second has a value of 1, and so on. Therefore, when using ComponentIndex with ComponentCount, note that ComponentCount is always 1 more than the highest Components index.

See Also

Personal tools
Translations
Newest Version