SetVariantProp

Set variant valued property

Declaration

Source position: variants.pp line 349

  procedure SetVariantProp(Instance: TObject; const PropName: string; 
                          const Value: Variant);
  procedure SetVariantProp(Instance: TObject; PropInfo: PPropInfo; 
                          const Value: Variant);

Description

SetVariantProp sets the value of the variant-types property described by PropInfo or PropName from the Instance to Value.

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

See also

Name Description
GetPropValue Return a property value as a variant
GetVariantProp Get variant valued property
TypInfo Access Run-Time Type Information (RTTI)
TypInfo.OnSetVariantProp Callback to set a variant property value.