掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
QRShapeの動的生成 (ID:21557)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
こんな感じになりました。 procedure TForm2.FormCreate(Sender: TObject); var cnt:Integer; begin for cnt := 1 to 10 do begin with TQRLabel.Create(Self) do begin Parent := QuickRep; Name := 'QLabel' + IntToStr(cnt); end; end; end; procedure TForm2.QuickRepBeforePrint(Sender: TCustomQuickRep; var PrintReport: Boolean); var cp: TComponent; cnt:Integer; begin for cnt := 1 to 10 do begin cp := FindComponent('QLabel' + IntToStr(cnt)); TQRLabel(cp).Caption := IntToStr(cnt); TQRLabel(cp).Top := 10 * cnt; TQRLabel(cp).Left := 10 * cnt; end; end; これならPrivate管理しなくて済みますね。 この後、QRShapeと併せて管理したかったので、これなら楽で助かります。 ありがとうございました。
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.