Skip to content

SetVariantProp

Set variant valued property.

Declaration

Source position: variants.pp line 356

procedure SetVariantProp(Instance: TObject; const PropName: AnsiString; 
                        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
TypInfo Access Run-Time Type Information (RTTI).
TypInfo.OnSetVariantProp Callback to set a variant property value.
GetVariantProp Get variant valued property.
GetPropValue Return a property value as a variant.