So zb: (Ohne garantie auf fehler is jez mal so hingetippt
Delphi-Quellcode:
procedure TForm8.Edit1Change(Sender: TObject);
var i, OldLength: Integer;
begin
if Edit1.Text='' then exit;
for i := 0 to Liste.Count-1 do
begin
if copy(Liste.Items[i], 1, Length(Edit1.Text))=Edit1.Text then
begin
OldLength:=Length(Edit1.Text);
Edit1.Text:=Liste.Items[i];
Edit1.SelStart:=OldLength;
Edit1.SelLength:=Length(Edit1.Text);
exit;
end;
end;
end;
*nachcodelibmanagernschrei*