SetObjectProp

Set the value of an object-type property.

Declaration

Source position: typinfo.pp line 937

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

Description

SetObjectProp assigns Value to the object property described by PropInfo or with name Propname for the object Instance.

For an example, see GetObjectProp .

Errors

No checking is done whether Instance is non-nil, or whether PropInfo describes a valid object property of Instance. Specifying an invalid property name in PropName will result in an EPropertyError exception.

See also

Name Description
GetObjectProp Return value of an object-type property.
SetFloatProp Set value of a float property.
SetInt64Prop Set value of a Int64 property
SetMethodProp Set the value of a method property
SetOrdProp Set value of an ordinal property
SetStrProp Set value of a string property