GetPropValue¶
Get property value as a variant.
Declaration¶
Source position: typinfo.pp line 1293
function GetPropValue(Instance: TObject; const PropName: string)
: Variant;
function GetPropValue(Instance: TObject; const PropName: string;
PreferStrings: Boolean) : Variant;
function GetPropValue(Instance: TObject; PropInfo: PPropInfo) : Variant;
function GetPropValue(Instance: TObject; PropInfo: PPropInfo;
PreferStrings: Boolean) : Variant;
Description¶
GetPropValue returns the value of a property of the object Instance as a Variant value. The property can be specified as a name using PropName, or using property RTTI info in PropInfo. If PreferStrings is True then a string value is returned where possible.
The Variants unit must be added to your project for this function to be able to do its work properly.
See also¶
| Name | Description |
|---|---|
| GetPropInfos | Return a list of published properties. |
| GetPropInfo | Return property type information, by property name. |
| SetPropValue | Set property value as variant. |