Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi ListView jede 2te Zeile Farbig? (https://www.delphipraxis.net/86400-listview-jede-2te-zeile-farbig.html)

Flom 13. Feb 2007 17:11


ListView jede 2te Zeile Farbig?
 
Hallo,
Weiß einer von euch ob und wie ich in einem ListView jede 2te Zeile Farbig hinterlegen kann für eine bessere Übersicht?!

Grüße

Hawkeye219 13. Feb 2007 17:45

Re: ListView jede 2te Zeile Farbig?
 
Hallo Flom,

versuche es so:

Delphi-Quellcode:
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
  if Odd(Item.Index) then
    Sender.Canvas.Brush.Color := clYellow
  else
    Sender.Canvas.Brush.Color := clRed;
end;
Gruß Hawkeye

Flom 13. Feb 2007 18:48

Re: ListView jede 2te Zeile Farbig?
 
cool danke :) :dp:


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:28 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