Skip to content

SetPropValue

Set a property value as a variant.

Declaration

Source position: variants.pp line 353

procedure SetPropValue(Instance: TObject; PropInfo: PPropInfo; 
                      const Value: Variant);  overload; overload;

Arguments

Name Description
Instance Instance to set property value of.
PropInfo Pointer to property information (RTTI).
Value Value to set property to.

Description

SetPropValue sets the value of the property described by PropInfo from the Instance. The property value is set from the variant-typed value Value.

This function is used as the value for the TypInfo unit's OnSetPropValue 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.OnSetPropValue Callback to set a property value as a variant.
GetPropValue Return a property value as a variant.