Autor Beitrag
Visum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Do 11.07.02 17:05 
Hi,
wahrscheinlich eine eher einfache Frage, aber ich komm nicht drauf:

Wie kann ich den Inhalt (die Items) einer Listbox in eine tStringList kopieren?

Danke
Visum
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Do 11.07.02 17:11 
Hi user defined image,
hiermit sollte es funktionieren:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
var
  st: TStringList;
begin
  st:=TStringList.Create;
  st.AddStrings(self.ComboBox1.Items);
  st.Free;
end;


Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
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.07.02 21:21 
oder so
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject); 
var 
 st: tStringList; 
begin 
 st := tStringList.Create; 
 st.Assign (ComboBox1.Items); 
 st.Free; 
end;