0
votes

How to use stylized table in Delphi 7? For example:

enter image description here

2
Your example is not really a 'style' more a 'customisation'. A way here : delphi.about.com/od/usedbvcl/l/aa031699.htmphilnext
philnext, no. Not only the color.newpdv

2 Answers

5
votes

If you mean which you want themed the TDbGrid component, you can use the Themed DBGrid runtime replacement from Jeremy North's and Andreas Hausladen.

1
votes

I wrote and tested for you this example on Delphi 7 and Windows 8.1

Use Event DrawColumnCell to change color or something else.

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
  try
    if Column.FieldName = 'FIRST_NAME' then
      DBGrid1.Canvas.Brush.Color := clGreen;
  finally
    DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
  end;
end;

Download full example: file