Autor Beitrag
Juri13
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Do 29.03.12 16:01 
Hallo ich bin neu hier. Im Programmierunterricht müsen wir eine Liste mit 4 Spalten in Delphi anzeigen. Wie geht das denn?


Moderiert von user profile iconGausi: Topic aus Algorithmen, Optimierung und Assembler verschoben am Do 29.03.2012 um 16:15
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8535
Erhaltene Danke: 473

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 29.03.12 16:18 
Hallo und :welcome: in der Entwickler-Ecke,

da musst du dir nur eine passende Komponente suchen. ;-)

In Frage kommen würde hier wohl das StringGrid, oder (wahrscheinlicher besser) die ListView mit ViewStyle auf vsReport. Bei der Eigenschaft Columns kann man dann die Spalten definieren.

_________________
We are, we were and will not be.
Juri13 Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Do 29.03.12 16:26 
Hallo, danke für die freundliche Begrüßung. Ich habe Listview genommen und das jetzt so wie im Bild unten. Wie kann ich nun noch Einträge adden?
Einloggen, um Attachments anzusehen!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10181
Erhaltene Danke: 1254

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 29.03.12 16:43 
Moin!

user profile iconJuri13 hat folgendes geschrieben Zum zitierten Posting springen:
Wie kann ich nun noch Einträge adden?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
  var
    NewItem: TListItem;
begin
  NewItem := ListView1.Items.Add;
  NewItem.Caption := '1. Spalte';
  NewItem.SubItems.Add('2. Spalte');
  NewItem.SubItems.Add('3. Spalte');
  //...
cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Juri13 Threadstarter
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Do 29.03.12 16:54 
Cool!!!!! Es funktioniert :) Danke
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10181
Erhaltene Danke: 1254

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 29.03.12 19:08 
Moin!

Markierst du den Thread noch entsprechend, wenn dein Problem gelöst ist? Danke. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.