Question

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

enter image description here

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top