Registriert seit: 28. Mai 2004
Ort: Hamburg
98 Beiträge
Delphi 2005 Personal
|
Re: listbox items in inis speichern?
10. Jun 2004, 22:31
Delphi-Quellcode:
uses IniFiles;
...
procedure TForm1.Button1Click(Sender: TObject);
var
Ini: TIniFile;
i : Integer;
begin
ini := TIniFile.Create('C:\test.ini');
try
ini.WriteInteger('Items', 'Count', ListBox1.Items.Count);
for i := 0 to Pred(ListBox1.Items.Count) do
ini.WriteString('Items', 'Item'+IntToStr(i), ListBox1.Items.Strings[i]);
finally
ini.Free;
end;
end;
The Double-Crunch-Peanuts!
SwapIt:
|