Board index » delphi » Create QR labels at runtime

Create QR labels at runtime

Win 95, Delphi 3.01, QR 2.0i

I'd like to create about 50 labels and load values at run-time.  Here's
the (test) code I've tried:

var
  TempLabel:                          TQRLabel;

begin
  With Form2.QuickRep1 do begin
    TempLabel:=TQRLabel.Create(Self);
    With TempLabel do begin
      Caption:='Test label';
      Name:='QRLabel2';
      Top:=96;
      Left:=400;
    end;
    Preview;
  end;
end;

It runs OK, but I can't see the label.  Something obvious, I bet!
An alternate solution might be to create just 1, then copy it...but I
can't figure that out, either.  Help!

alan.s.macart...@boeing.com
sul...@gte.net

 

Re:Create QR labels at runtime


Quote
In article <346B7B68.5...@boeing.com>, Alan MacArthur <nospam-alan.s.macart...@boeing.com> wrote:
>Win 95, Delphi 3.01, QR 2.0i

>I'd like to create about 50 labels and load values at run-time.  Here's
>the (test) code I've tried:

>var
>  TempLabel:                          TQRLabel;

>begin
>  With Form2.QuickRep1 do begin
>    TempLabel:=TQRLabel.Create(Self);
>    With TempLabel do begin
>      Caption:='Test label';
>      Name:='QRLabel2';

        OWNER = Quickrep1         < =============================
Quote
>      Top:=96;
>      Left:=400;
>    end;
>    Preview;
>  end;
>end;

Something around these lines. It is either OWNER or PARENT.

The Graphical Gnome (r...@ktibv.nl)
Sr. Software Engineer IT Department
-----------------------------------------
The Unofficial Delphi Developers FAQ
http://www.gnomehome.demon.nl/uddf/index.htm

Other Threads