hier mal die Autovervollständigen-Prozedur, die ich verwende:
Delphi-Quellcode:
procedure Autocomplete(Combobox:TCombobox);
var
oldpos: Integer;
item: Integer;
changeproc:TNotifyEvent;
begin
with combobox do
begin
oldpos := selstart;
item := Perform( CB_FINDSTRING, -1,
lparam( Pchar( text )));
if item >= 0 then
begin
changeproc:=onchange;
onchange := nil;
text := items[item];
selstart := oldpos;
sellength := gettextlen - selstart;
onchange := changeproc;
end;
end;
end;
HTH Frank