How
about something like :-
//
call from keypress
procedure automatch(cbo : tcombobox; var keyascii : char); var sbuffer : pchar; s :string; retval : longint; begin getmem(sbuffer,255); try s := copy(cbo.text,1,cbo.selstart) + (keyascii); {needs a tidy here} strpcopy(sbuffer,s); retval := sendmessage(cbo.handle,CB_FINDSTRING,word(-1),longint(sbuffer)); if retval <> CB_ERR then begin cbo.ItemIndex := retval; cbo.text := cbo.Items.Strings[retval]; cbo.selstart := length(s); cbo.SelLength := length(cbo.text); keyascii := chr(0); {supress if called from keypress} end else begin cbo.itemindex := -1; cbo.text := s; cbo.selstart := length(s) ; end; finally freemem(sbuffer,255); end; end;
|
- [DUG]: Special ComboBox Mark Howard
- Re: [DUG]: Special ComboBox Bevan Edwards
- Re: [DUG]: Special ComboBox Mark Howard
- RE: [DUG]: Special ComboBox Patrick Dunford
- RE: [DUG]: Special ComboBox Chris Reynolds
- RE: [DUG]: Special ComboBox Marshall, Paul
- Re: [DUG]: Special ComboBox Mark Howard
- RE: [DUG]: Special ComboBox Laurence Bevan