Delphi-PRAXiS
Seite 2 von 2     12   

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 2. Spalte ansprechen (https://www.delphipraxis.net/16869-listview-2-spalte-ansprechen.html)

fkerber 24. Feb 2004 19:30

Re: listview 2. Spalte ansprechen
 
Hi!

Ja klar, weil in der Listview ja strings drinstehen.
Deswegen muss es bei dir wohl alles in allem so aussehen:

Delphi-Quellcode:
if strtoint(lvi.SubItems.Text) > 0 ...
Ciao fkerber

Micha 24. Feb 2004 19:42

Re: listview 2. Spalte ansprechen
 
O.K., aber es funktioniert trotzdem nicht.

Denn
Delphi-Quellcode:
lvi.SubItems.Text
enthält Spalte 2 UND 3

M-O-D 25. Feb 2004 06:42

Re: listview 2. Spalte ansprechen
 
Hi,

wenn das Problem noch steht... so gehts:

Im Ereigniss der Listview: ONCustomDrawSubItem

Zugriff aufs Subitem: Item.SubItems[0];

also so(LV is der Name der Listview :zwinker: :
[delphi]

procedure TForm1.LVCustomDrawSubItem(Sender: TCustomListView;
Item: TListItem; SubItem: Integer; State: TCustomDrawState;
var DefaultDraw: Boolean);
begin
with LV.Canvas.Brush do begin

if StrToInt(Item.SubItems[0]) > 0 then
Color := clred;

end;
end;
[delphi]


Ich hoffe es hilft weiter...
CU


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:55 Uhr.
Seite 2 von 2     12   

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