Author: Jonas Bilinkevicius How to retrieve all string properties and their values from any TObject descendant Answer: 1 { ... } 2 var 3 XObject: TObject; 4 XProps: PPropList; 5 XPropInfo: PPropInfo; 6 XTypeData: PTypeData; 7 XPropsStr: string; 8 i: integer; 9 { ... } 10 begin 11 { ... } 12 XObject := OneOfYourComponents; 13 XTypeData := TypInfo.GetTypeData(XObject.ClassInfo); 14 XPropsStr := ''; 15 GetMem(XProps, XTypeData^.PropCount * sizeof(Pointer)); 16 try 17 TypInfo.GetPropInfos(XObject.ClassInfo, XProps); 18 for i := 0 to XTypeData.PropCount - 1 do 19 begin 20 XPropInfo := XProps[i]; 21 if Assigned(XPropInfo) then 22 begin 23 if XPropInfo.PropType^^.Kind in [tkString, tkLString, tkWString] then 24 XPropsStr := XPropsStr + XProps[i].Name + ' = ' + 25 GetStrProp(XObject, XProps[i].Name) + #$0D#$0A; 26 end; 27 end; 28 finally 29 FreeMem(XProps); 30 end; 31 ShowMessage(XPropsStr); 32 { ... }