Unit 'Variants' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

GetVariantProp

Get variant valued property.

Declaration

Source position: variants.pp line 354

function GetVariantProp(

  Instance: TObject;

  PropInfo: PPropInfo

):Variant;

function GetVariantProp(

  Instance: TObject;

  const PropName: AnsiString

):Variant;

Arguments

Instance

  

Instance from which to get property.

PropInfo

  

Pointer to property description (RTTI).

Function result

Property value.

Arguments

Instance

  

Instance from which to get property.

PropName

  

Property name.

Description

GetVariantProp returns the value of the variant-types property described by PropInfo or PropName from the Instance.

This function is used as the value for the TypInfo unit's OnGetVariantProp callback. This callback is automatically initialized with the function when the variants unit is used.

See also

TypInfo

  

Access Run-Time Type Information (RTTI).

TypInfo.OnGetVariantProp

  

Callback to get a variant property value.

SetVariantProp

  

Set variant valued property.

GetPropValue

  

Return a property value as a variant.


Documentation generated on: Nov 22 2024