少し問題があります。次のように TPanel に TPaintBox を作成しようとしています。
procedure TForm1.mkPaint(S: string);
var PB: TPaintBox;
begin
PB := TPaintBox.Create(Self);
with PB do
begin
Parent := Panel1;
Visible := True;
Name := S;
Height := 100;
Width := 100;
Left := 8;
Top := 8;
// ParentColor := False;
Brush.Style := bsSolid;
Brush.Color := $00000000;
end;
Application.ProcessMessages;
end;
ここで、PaintBox の Parent を Form1 に変更すると、ブラシが表示されます。しかし、親を Panel1 に変更すると、何も起こりません。どうすればこれを修正できますか?
前もって感謝します!