Autor Beitrag
peicher
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16

Windows XP, Windows 2K, Suse Linux 8.2
Borland Delphi 7
BeitragVerfasst: Do 11.09.03 08:44 
Kann ich auf Elemete in einer TListView auch per index zugreifen? Wenn ja, wie? Habs schon versucht, hat aber nicht geklappt... :idea:

cu

_________________
-PHIL-
ShadowThief
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278



BeitragVerfasst: Do 11.09.03 08:49 
hi,

ich habs grad mal probiert:

ausblenden Delphi-Quelltext
1:
ShowMessage(ListView1.Items[2].Caption);					


also das geht schon so.

shadow.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 11.09.03 09:20 
peicher hat folgendes geschrieben:
Habs schon versucht, hat aber nicht geklappt...

Dann poste bitte in Zukunft deine "Code-Versuche"... dann können wir dir besser helfen!

Gruß
Tino
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Do 11.09.03 09:42 
Hallo,

Eines noch:
Die indizierung geht bei null los. Wenn du also 4 Elemente in der liste hast, hat das erste den index 0 und das letzte den index 3.

Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.