Retrieves a list of component properties.
function GetPropList(TypeInfo: PTypeInfo; TypeKinds: TTypeKinds; PropList: PPropList; SortList: Boolean = True): Integer; overload; function GetPropList(TypeInfo: PTypeInfo; out PropList: PPropList): Integer; overload; function GetPropList(AObject: TObject; out PropList: PPropList): Integer; overload;
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.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|