Thema: Delphi Stringgrids

Einzelnen Beitrag anzeigen

Benedikt
(Gast)

n/a Beiträge
 
#2

Re: Stringgrids

  Alt 15. Feb 2004, 16:25
Hi,

nutz das OnDrawCell-Ereignis des StringGrids.

Delphi-Quellcode:
if (ARow=2) then
begin
      stringGrid.Canvas.Brush.Color:=clRed;
      stringGrid.Canvas.FillRect(Rect);
      DrawText(stringGrid.Canvas.Handle, PChar(stringGrid.Cells[ACol, ARow]), Length(stringGrid.Cells[ACol, ARow]), Rect, DT_LEFT)
end;
Dieser Code färbt dir die dritte Zeile mit einem roten Hintergrund ein.
  Mit Zitat antworten Zitat