Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
6361 00 JVCL Components minor always 2014-11-22 00:40 2019-05-29 10:10
ricolebo  
obones  
normal  
resolved 3.47  
fixed  
none    
none Daily / GIT  
0006361: JvDBCombobox : Bug because search key is case insensitive
When the keyList are like this : kkk;KKK,KkK ... the comboBox can't work because the indeOf to find the key is case insensitive and so the seach found always the first value of the list.

This bug can be simply fixed, just set the TSTringList.caseSensitive to true

I attach a demo to show you the bug and how to fix it.
The Fix : unit JvDBCombobox.pas

//=== { TJvCustomDBComboBox } ================================================

constructor TJvCustomDBComboBox.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle := ControlStyle + [csReplicatable];
  FDataLink := TFieldDataLink.Create;
  FDataLink.Control := Self;
  FDataLink.OnDataChange := DataChange;
  FDataLink.OnUpdateData := UpdateData;
  FDataLink.OnEditingChange := EditingChange;
  FPaintControl := TPaintControl.Create(Self, 'COMBOBOX');
  FBeepOnError := False;

  FListSettings := TJvDBComboBoxListSettings.Create(Self);
  FValues := TStringList.Create;
  FValues.CaseSensitive := True; // Fix
  FValues.OnChange := ValuesChanged;
  FEnableValues := True;
  Style := csDropDownList;
end;

zip file icon TJvDBComboBox.zip [^] (19,369 bytes) 2014-11-22 00:40
Issue History
2014-11-22 00:40 ricolebo New Issue
2014-11-22 00:40 ricolebo File Added: TJvDBComboBox.zip
2014-12-04 15:53 obones Status new => acknowledged
2019-05-20 21:40 mh Note Added: 0021847
2019-05-28 22:42 mh Note Added: 0021851
2019-05-29 10:10 obones Status acknowledged => resolved
2019-05-29 10:10 obones Fixed in Version => Daily / GIT
2019-05-29 10:10 obones Resolution open => fixed
2019-05-29 10:10 obones Assigned To => obones

Notes
(0021847)
mh   
2019-05-20 21:40   
Pull request created and a property for controlling the search behavior added:
https://github.com/project-jedi/jvcl/pull/128 [^]
(0021851)
mh   
2019-05-28 22:42   
Can be closed now as the fix for this has been merged in!