I have a panel which has a number of controls (dbedits, dbcheckbox, etc) and
I want to change the background colour of each control when the Insert
button is clicked. I've tried using the Controls property like so:

  for x := 0 to Panel5.ControlCount - 1 do
  begin
    MyControl := Panel5.Controls[x];
    MyControl.Color := clRed;
  end;

 but Color is a protected property of TControl. Is there any other way of
doing this without hard-coding each individual control. I also want to
change the colour back when the new record is posted.

Laurence Bevan
Master Business Systems Ltd


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to