Board index » delphi » Changing the background color of TPaintBox1

Changing the background color of TPaintBox1

Hello Newsgroup-user!

How can I change the backgroundcolor of a Paintbox in Delphi 3.

Thanks
Tobias

 

Re:Changing the background color of TPaintBox1


Quote
On Tue, 10 Jul 2001, Tobias Hampe wrote:

You may change the Background-Color of your Paintbox as follows:

procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
  PaintBox1.Canvas.Brush.Color := clGreen;
  PaintBox1.Canvas.FillRect(PaintBox1.ClientRect);
end;

Good luck
  Jan

Quote
> Hello Newsgroup-user!

> How can I change the backgroundcolor of a Paintbox in Delphi 3.

> Thanks
> Tobias

Other Threads