So viele Sourcen, es klappt nun
So schaut's aus:
Delphi-Quellcode:
procedure TForm1.Button8Click(Sender: TObject);
var
MyList: THashedStringList;
Index, i: Integer;
begin
MyList := THashedStringList.Create;
MyList.LoadFromFile(
ExtractFilePath(Application.ExeName) + 'plzDat.txt');
try
begin
for i := 0 to MyList.Count - 1 do
begin
index := MyList.IndexOfName(PlzEdit.Text + ' ');
OrtEdit.Text := IfThen(index < 0, '', Trim(MyList.ValueFromIndex[index]));
end;
end;
finally
MyList.Free;
end;
end;
Danke an alle !