Parent ... Owner ??? A TImage has no caption ???
Should be Parent, if anything. And yes, TImage has a
Caption property, as any other descendant of
TControl.
AFAIK it's not used for anything, but it has it.
ETA: This code will return the caption of the Parent of any control (including TImage):
function GetParentCaption(const AControl: TControl): String;
begin
if Assigned(AControl) and Assigned(AControl.Parent) then
Result := AControl.Parent.Caption
else
Result := '';
end;
And, for completeness sake, this one from the Owner:
function GetParentCaption(const AComponent: TComponent): String;
begin
if Assigned(AComponent)
and AComponent.InheritsFrom(TControl)
and Assigned(TControl(AComponent).Parent) then
Result := TControl(AComponent).Parent.Caption
else
Result := '';
end;