Maybe this helps you as it helped me.
That method looks if property is available and set it.
uses
TypInfo, Rtti;
function SetProperty(const AControl: TControl; const AProperty: string; const AValue: TValue): Boolean;
var
LControl: TControl;
LRttiContext: TRttiContext;
LRttiProperty: TRttiProperty;
begin
Result := False;
try
LControl := AControl;
LRttiProperty := LRttiContext.GetType(LControl.ClassType).GetProperty(AProperty);
if ((LRttiProperty <> nil) and (LRttiProperty.Visibility in [mvPrivate, mvProtected, mvPublic, mvPublished])) then
begin
LRttiProperty.SetValue(LControl, AValue);
Result := True;
end;
except
end;
end;
and it can be used like:
SetProperty(AControl, 'Caption', AValue);