View Issue Details

IDProjectCategoryView StatusLast Update
0002983JEDI VCL00 JVCL Componentspublic2005-05-24 06:46
ReporterwestphalAssigned ToAHUser 
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0002983: jvAutoComplete
DescriptionAdded feature

Possibility to change the searched part of the autocomplete using a new assigned property: OnGetSearchPart

usefull if you wish to be able to enter in an edit box, multiple items
Additional InformationUsage exemple:

  FAutoComplete := TJvEditListAutoComplete.Create(edRecipients,FDirectoryList);

function TForm1.GetSearchPart(sender : TObject; anItem : string) : string;
var p : integer;
  if p<>0 then delete(result,1,p);
TagsNo tags attached.


2005-05-23 05:03


JvAutoComplete.pas (28,514 bytes)


2005-05-23 05:16

developer   ~0007301

I have added the feature. But I've renamed the event to "OnGetSearchPrefix".

Added to CVS.


2005-05-24 05:37

reporter   ~0007332

Hello, whoaho it was fast ! Thanks

But my proposition contained also a modification of the selectItem proc in the procedure Autocomplete in order to not replace the full content of the control, with that modification, you can add sevral items in an edit box

Here is an adapted version of this procedure:

  function SelectItem(const AnItem: string): Boolean;
    Idx: Integer;
    ValueChange: Boolean;
    partToFind : string;

    if partToFind = '' then
      Result := False;
    Idx := FindItemPrefix(-1, partToFind);
    Result := (Idx <> -1);
    if not Result then
    ValueChange := Idx <> GetItemIndex;
    if ListSearch then
      FFilter := partToFind;
      SetText(AnItem + Copy(GetItemAt(Idx), Length(partToFind) + 1, MaxInt));
      SetEditSel(Length(AnItem), Length(GetText));
    if ValueChange then


2005-05-24 06:46

developer   ~0007333

Fixed in CVS.

Issue History

Date Modified Username Field Change
2005-05-23 05:01 westphal New Issue
2005-05-23 05:03 westphal File Added: JvAutoComplete.pas
2005-05-23 05:16 AHUser Status new => resolved
2005-05-23 05:16 AHUser Resolution open => fixed
2005-05-23 05:16 AHUser Assigned To => AHUser
2005-05-23 05:16 AHUser Note Added: 0007301
2005-05-24 05:37 westphal Status resolved => feedback
2005-05-24 05:37 westphal Resolution fixed => reopened
2005-05-24 05:37 westphal Note Added: 0007332
2005-05-24 06:46 AHUser Status feedback => resolved
2005-05-24 06:46 AHUser Resolution reopened => fixed
2005-05-24 06:46 AHUser Note Added: 0007333