Retrieves a component's property value as a variant.
function GetPropValue(Instance: TObject; const PropName: string; PreferStrings: Boolean = True): Variant; overload; function GetPropValue(Instance: TObject; PropInfo: PPropInfo; PreferStrings: Boolean = True): Variant; overload;
Variant GetPropValue(TObject * Instance, const AnsiString PropName, Boolean PreferStrings = True); Variant GetPropValue(TObject * Instance, PPropInfo PropInfo, Boolean PreferStrings = True);
TypInfo
GetPropValue utilises Delphi's RTTI (Run Time Type Information) to retrieve a a component property as a variant.
In one form of this function, the object Instance's property is defined by a PropInfo record. GetPropInfo and GetPropList can be used to obtain such a record.
In the other form of this function, the name of the property, PropName, is explicitly given.
In both forms of the function, the returned value the property value as a variant.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|