From RAD Studio API Documentation
Jump to: navigation, search


function GetPropList(TypeInfo: PTypeInfo; TypeKinds: TTypeKinds; PropList: PPropList; SortList: Boolean): Integer;
function GetPropList(TypeInfo: PTypeInfo; out PropList: PPropList): Integer;
function GetPropList(AObject: TObject; out PropList: PPropList): Integer;


extern DELPHI_PACKAGE int __fastcall GetPropList(PTypeInfo TypeInfo, TTypeKinds TypeKinds, PPropList PropList, bool SortList = true)/* overload */;


Type Visibility Source Unit Parent
function public
System.TypInfo System.TypInfo


Retrieves a list of component properties.

GetPropList utilises Delphi's RTTI (Run Time Type Information) to retrieve a list of property information records for a component or component type.

In one form of this function, TypeInfo defines the component type, PropList defines a variable to receive the list of properties : a pointer to a TPropList variable, and TypeKinds defines the type of properties that will be returned. Use tkAny to return all types. The list may optionally be sorted by setting SortList true.

The Delphi inbuilt TypeInfo function may be used to provide the TypeInfo value.

In the other form of this function, you specify a component instance rather than component type. The TypeKinds and SortList parameters can no longer be specified.

In both forms of the function, the returned value is the number of properties in PropList.

Note: If you do not need the count of properties returned, use GetPropInfos.

See Also