need to typcast the return value ...
> function GetMyLabel(Index:Integer): TQRLabel;
> property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default;
>
> function GetMyLabel(Index:Integer):TQRLabel;
> begin
> // in production probably should do some error checking ...
> return FindComponent(format('mylabel_%d',[Index])
as TQRLabel;
> end;
-ns
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/