Hallo,
ich habe die test.txt so angelegt wie von Dir beschrieben. Bei mir funktionieren beide Versionen:
Delphi-Quellcode:
procedure TForm1.TreeView1DblClick(Sender: TObject);
begin
if Assigned (TreeView1.Selected) then
Edit1.Text := Copy (TreeView1.Items[TreeView1.Selected.AbsoluteIndex].Text, 1, Edit1.MaxLength)
end;
Delphi-Quellcode:
procedure TForm1.TreeView1DblClick(Sender: TObject);
begin
if Assigned (TreeView1.Selected) then
Edit1.Text := Copy (TreeView1.Selected.Text, 1, Edit1.MaxLength)
end;
Wobei Edit1.MaxLength := 7;
Gruß