This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Implement Full Text (Any Part) Database ComboBox Search function

Hello,
Please, How to efficiently add feature of Full-Text (Any Part) search functionality to LMD DB Combo box? This is an IMPORTANT feature that I thick it is most required for DB combo box controls.
For example, in a DB combo box control when I write [book], it shows in the drop-down list all the DB records where [book] is part of it, like:
       All books
       Mathematical Books
       Books for children
       ... etc.
Regards.

Comments

  • Currently there now built-in way to achieve this. We will consider your proposal as a TODO item.

    You can try to implement it yourself similar to this:

    procedure TForm1.LMDDBListComboBox1KeyPress(Sender: TObject; var Key: Char);
    begin
      if not LMDDBListComboBox1.DroppedDown then
        LMDDBListComboBox1.Open;
    end;

    procedure TForm1.LMDDBListComboBox1TextChangedAt(sender: TObject; At: Integer);
    var
      i:   Integer;
      tx:  string;
      its: TStrings;
    begin
      if not LMDDBListComboBox1.DroppedDown then
        Exit;

      tx  := LMDDBListComboBox1.Text; // search text.
      its := LMDDBListComboBox1.Items;

      its.BeginUpdate;
      try
        its.Clear;
        for i := 1 to 3 do
          its.Add('filtered-item-' + i.ToString);
      finally
        its.EndUpdate;
      end;
    end;
Sign In or Register to comment.