Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Stringgrids (https://www.delphipraxis.net/16336-stringgrids.html)

p3ps1 15. Feb 2004 16:18


Stringgrids
 
Ich habe gerade versucht eine bestimmte Reihe eines Stringgrids einzufärben, bzw. hervorzuheben, habe allerding nicht rausgefunden wie das geht. Könnt ihr mir da helfen?

Benedikt 15. Feb 2004 16:25

Re: Stringgrids
 
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.

p3ps1 15. Feb 2004 16:28

Re: Stringgrids
 
dankeschön


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:09 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz