Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant change the color of a TPanel in delphi [duplicate]

Tags:

delphi

the color of my panel wont change with this code. I tried it with a button as well. I'm fairly new to Delphi so any answers would be appreciated. Thanks

procedure TForm1.pnlClick(Sender: TObject);
begin
  pnl.Color := clYellow;
end;
like image 441
Rudi Thiel Avatar asked Apr 18 '16 19:04

Rudi Thiel


1 Answers

Try set values like ParentBackground and ParentColor to false.

like image 59
Toster Avatar answered Oct 03 '22 21:10

Toster