Hi,
kann mir jemand sagen, wo hier der Fehler liegt?
Delphi-Quellcode:
procedure TMainWindow.FormShow(Sender: TObject);
var f: Textfile;
text: String;
Node: TTreeNode;
begin
AssignFile(f, 'Theme.dat');
if not DirectoryExists('Data') then MkDir('Data');
if FileExists('Theme.dat') then Reset(f)
else Rewrite(f);
while not EOF(f) do begin
Readln(f, text);
trim(text);
Node.Text := text;
if tvChoice.Items.Count = 0 then
tvChoice.Items.AddFirst(Node, text)
else
tvChoice.Items.Add(Node, text);
end;
CloseFile(f);
end;