Autor Beitrag
Lux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 28.02.05 12:41 
Hallo Leute.
Sagt mal habt ihr zufällig, ein Tutorial für die TListView Komponente?
Ich kenne mich mit diesem Ding überhaupt nicht aus und hab nun auch schon hier im Forum und auf anderen Foren gesucht.
Bei Google war ich auch erfolglos.


Moderiert von user profile iconTino: Topic aus CLX / Delphi Language (Object-Pascal) verschoben am Mo 28.02.2005 um 11:45

_________________
There are 10 different people.
Those who understand binary code and those who don't understand.
Lux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 28.02.05 14:30 
Kann mir zumindest jemand einen Code Schnipsel geben, wo ich drauß ersehen kann, wie ich aus einer Textdatei Daten in die Listview schreiben kann? :wink:

_________________
There are 10 different people.
Those who understand binary code and those who don't understand.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 28.02.05 14:43 
Hallo,

wenn du ein allgemeines Verständnis für Delphi und Komponenten hast, dann reicht schon ein Blick in die Hilfe (F1). Da sind auch ein paar Beispiele dabei.
Du willst also Elemente einfügen. Das geht so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
var
  ListItem: TListItem;
begin
  with ListView1 do begin
    {BeginUpdate;   //bei mehreren Items sinnvoll}
    ListItem := Items.Add;
    ListItem.Caption := '1. Spalte';  //wenn ViewStyle = vsReport
    ListItem.SubItems.Add('2. Spalte');
    ListItem.SubItems.Add('3. Spalte');
    {usw...}
    {EndUpdate;}
  end;
end;
Wenn du mehr Hilfe brauchst, dann kannst ja nochmal bescheid geben!

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Lux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 28.02.05 14:49 
Erst einmal vielen dank! :)
Die Delphi Hilfe hatte ich mir auch schon angeschaut aber irgendwie finde ich die Beispiele nicht. :oops:
Du meinst mit Spalte nun eigentlich die Zeilen oder?
Oder wie bekomme ich sonst mehrere Zeilen?
Ich hab 6 spalten und Pro Zeile auch 6 Einträge die ich da einfügen muss...

_________________
There are 10 different people.
Those who understand binary code and those who don't understand.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 28.02.05 14:56 
Hallo,

ich meine schon Spalten. Wenn du mehrere Zeilen einfügen möchtest, dann musst du halt das ganze Enifügen in einer Schleife durchgehen.
Wie sieht den die Datei aus, aus der du auslesen möchtest?

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Lux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 28.02.05 15:02 
So sieht die Liste aus.
ausblenden Quelltext
1:
2:
3:
4:
5:
BEHRENS. IRIS    Begriffe     dt. Varianten            -999 14.12.2004 08:25:34    9.8333 
BEHRENS. IRIS    Bildarchiv   b. Mauer  free recall    -999 25.11.2004 09:09:33   92.8571 
BEHRENS. IRIS    Bildarchiv   b. Mauer  free recall    -999 26.11.2004 09:04:27   92.8571 
BEHRENS. IRIS    Bildarchiv   b. Mauer  free recall    -999 29.11.2004 09:08:43  100.0000 
BEHRENS. IRIS    Bildarchiv   b. Mauer  free recall    -999 30.11.2004 09:15:35  100.0000


Ach so nun hab ich das verstanden.
Man sollte den Code auch einmal ausprobieren, wenn den schon einer hier reinschreibt :)

Ich versuche erstmal selber nun die Lösung hinzubekommen.
Wenn ich das nicht hinbekomme, dann melde ich mich nochmal :) Danke erstmal

_________________
There are 10 different people.
Those who understand binary code and those who don't understand.
Lux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 104

Win XP Home
D2005 Pers.
BeitragVerfasst: Mo 28.02.05 16:46 
Alles klar. Hat wunderbar geklappt!
Vielen Dank nochmals!

_________________
There are 10 different people.
Those who understand binary code and those who don't understand.