private
    { Private declarations }
    colorA:TColor;
    colorB:TColor;
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
  colorA:=$00BFE4e2;
  ColorBox2.Selected:=colorA;
  colorB:=$00e3fbfb;
  ColorBox1.Selected:=colorB;end;procedure TForm1.ColorBox1CloseUp(Sender: TObject);
begin
  colorB:=ColorBox1.Colors[ColorBox1.ItemIndex];
  DBGrid1.Invalidate;
end;procedure TForm1.ColorBox2CloseUp(Sender: TObject);
begin
  colorA:=ColorBox2.Colors[ColorBox2.ItemIndex];
  DBGrid1.Invalidate;
end;
选中了颜色没反应,,不知道哪里出问题。