Einzelnen Beitrag anzeigen

Benutzerbild von sx2008
sx2008

Registriert seit: 15. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#2

AW: TComboBox behält nach Neustart keine neuen Einträge

  Alt 14. Feb 2014, 21:43
Delphi-Quellcode:
// Hilfsfunktion weil man Dateinamen mehrfach braucht
function ComboBoxFilename:string;
begin
  Result := ExtractFilePath(ParamStr(0))+ '\combo1.txt';
end;
....

// speichern
Combobox1.Items.SaveToFile(ComboBoxFilename);
....

// laden beim Erzeugen des Formulars
if FileExists(ComboBoxFilename) then
  Combobox1.Items.LoadFromFile(ComboBoxFilename);
fork me on Github
  Mit Zitat antworten Zitat