Einzelnen Beitrag anzeigen

NicoDE
(Gast)

n/a Beiträge
 
#9

Re: Ini-Problem (abspeichern..)

  Alt 10. Okt 2003, 15:43
Soviel anders ist das auch nicht...
(um bei Deinem Beispiel zu bleiben)
Code:
  // Speichern
  if Ini.SectionExists('RecordSource') then
    Ini.EraseSection('RecordSource');
  Ini.WriteInteger('RecordSource', 'Count', sl.Count);
  for i := 0 to sl.Count - 1 do
    Ini.WriteString('RecordSource', 'Line' + IntToStr(i), sl[i]);

  // Laden
  sl.Clear();
  for i := 0 to Ini.ReadInteger('RecordSource', 'Count', 0) - 1 do
    sl.Add(Ini.ReadString('RecordSource', 'Line' + IntToStr(i), ''));
  Mit Zitat antworten Zitat