unit TermoPdvColorTest;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TTermoPdvColorTestForm = class(TForm)
    Panel23: TPanel;
    Panel1: TPanel;
    Panel2: TPanel;
    Panel3: TPanel;
    Panel4: TPanel;
    Panel5: TPanel;
    Panel6: TPanel;
    Panel7: TPanel;
    Panel8: TPanel;
    Panel9: TPanel;
    Panel10: TPanel;
    Panel11: TPanel;
    Panel12: TPanel;
    Panel13: TPanel;
    Panel14: TPanel;
    Panel15: TPanel;
    Panel16: TPanel;
    Panel17: TPanel;
    Panel18: TPanel;
    Panel19: TPanel;
    Panel20: TPanel;
    Panel21: TPanel;
    Panel22: TPanel;
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;


  procedure showTermoPdvColorTestForm;

var
  TermoPdvColorTestForm: TTermoPdvColorTestForm;

implementation

{$R *.dfm}

procedure showTermoPdvColorTestForm;
begin
  with TTermoPdvColorTestForm.Create(nil) do begin
    ShowModal;
    Free;
  end;

end;




procedure TTermoPdvColorTestForm.Button1Click(Sender: TObject);
var
  pnl: TPanel;
  i: Integer;
  s: string;
begin
  pnl := TPanel( (sender as TButton).parent );
  s := '';

  for i:=0 to pnl.ControlCount-1 do
    if pnl.Controls[i] is TPanel then
      with pnl.Controls[i] as TPanel do
        s := s + '  addColor(' + (sender as TButton).Caption + ', '+ Caption + ', $' + IntToHex(Color, 8) + ');'#13#10;


  Memo1.Text := s;

end;

end.
