View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002983 | JEDI VCL | 00 JVCL Components | public | 2005-05-23 05:01 | 2005-05-24 06:46 |
Reporter | westphal | Assigned To | AHUser | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002983: jvAutoComplete | ||||
Description | Added 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 Information | Usage exemple: FAutoComplete := TJvEditListAutoComplete.Create(edRecipients,FDirectoryList); FAutoComplete.OnGetSearchPart:=GetSearchPart; function TForm1.GetSearchPart(sender : TObject; anItem : string) : string; var p : integer; begin result:=anItem; p:=lastDelimiter(';',anItem); if p<>0 then delete(result,1,p); result:=TrimLeft(result); end; | ||||
Tags | No tags attached. | ||||
2005-05-23 05:03
|
JvAutoComplete.pas (28,514 bytes) |
|
I have added the feature. But I've renamed the event to "OnGetSearchPrefix". Added to CVS. |
|
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; var Idx: Integer; ValueChange: Boolean; partToFind : string; begin partToFind:=anItem; GetSearchItemPrefix(partToFind); if partToFind = '' then begin Result := False; SetItemIndex(-1); DoChange; Exit; end; Idx := FindItemPrefix(-1, partToFind); Result := (Idx <> -1); if not Result then Exit; ValueChange := Idx <> GetItemIndex; SetItemIndex(Idx); if ListSearch then begin SetItemIndex(Idx); FFilter := partToFind; end else begin SetText(AnItem + Copy(GetItemAt(Idx), Length(partToFind) + 1, MaxInt)); SetEditSel(Length(AnItem), Length(GetText)); end; if ValueChange then DoValueChange; end; |
|
Fixed in CVS. |
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 |