Thema: Delphi Stringgrid DrawCell

Einzelnen Beitrag anzeigen

Hansa

Registriert seit: 9. Jun 2002
Ort: Saarland
7.554 Beiträge
 
Delphi 8 Professional
 
#2

Re: Stringgrid DrawCell

  Alt 5. Okt 2005, 19:27
ungefähr so :

Delphi-Quellcode:
procedure Tfrm.sgDrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  inherited;
  if (ARow >= sgNr.FixedRows) and (ACol >= sgNr.FixedCols) then begin
    if sgNr.Cells [NeinSpalte,ARow] = 'Nthen with Sender as TStringGrid do begin
      sgNr.Font.Color := clwhite;
      sgNr.Brush.Color := clRed;
    end
  end
end;
Gruß
Hansa
  Mit Zitat antworten Zitat