Recent

Author Topic: [Solved] Need Combobox with full text search  (Read 876 times)

sstvmaster

  • Full Member
  • ***
  • Posts: 101
[Solved] Need Combobox with full text search
« on: March 25, 2019, 06:42:09 pm »
Hi, i need a Combobox with full text search.

Something like this: https://stackoverflow.com/questions/9466547/how-to-make-a-combo-box-with-fulltext-search-autocomplete-support

Greetings
« Last Edit: March 26, 2019, 08:36:17 pm by sstvmaster »
Lazarus 2.0.2 x32
Lazarus 2.1.0 Trunk x32
OS Win 7 32bit

ASerge

  • Hero Member
  • *****
  • Posts: 1300
Re: Need Combobox with full text search
« Reply #1 on: March 25, 2019, 06:53:42 pm »
Hi, i need a Combobox with full text search.
May be easier TListFilterEdit with TListBox?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: Need Combobox with full text search
« Reply #2 on: March 25, 2019, 08:30:09 pm »

sstvmaster

  • Full Member
  • ***
  • Posts: 101
Re: Need Combobox with full text search
« Reply #3 on: March 25, 2019, 09:06:08 pm »
In  {$MODE Delphi}?

But i think i'm not the only one who need this. Why this does not exist, already?

Greetings Maik
Lazarus 2.0.2 x32
Lazarus 2.1.0 Trunk x32
OS Win 7 32bit

sstvmaster

  • Full Member
  • ***
  • Posts: 101
Re: Need Combobox with full text search
« Reply #4 on: March 26, 2019, 04:47:34 pm »
i found an possible solution here: https://stackoverflow.com/questions/6667054/how-can-i-filter-the-contents-of-a-combo-box-based-on-whats-been-typed

i used listing 2.

It works, but there is a leak in funktion "Origin" and the mouse pointer disappears while typing.
I don't know how to solve the problems.

Please help, greetings Maik
Lazarus 2.0.2 x32
Lazarus 2.1.0 Trunk x32
OS Win 7 32bit

howardpc

  • Hero Member
  • *****
  • Posts: 3039
Re: Need Combobox with full text search
« Reply #5 on: March 26, 2019, 07:54:23 pm »
Try the attached project.
It filters the combo items, and additionally, prevents user entry of part-strings not in the allowed list. If the part-string entered is unique, it fills the combo with the unique string from the allowed list that matches.

sstvmaster

  • Full Member
  • ***
  • Posts: 101
Re: Need Combobox with full text search
« Reply #6 on: March 26, 2019, 08:31:43 pm »
Hi howardpc,

i will looking into.

I have solved the leak in the function Origin and missing mouse pointer. See attachment.

Many thanks for your help.

Greetings
« Last Edit: March 26, 2019, 08:37:02 pm by sstvmaster »
Lazarus 2.0.2 x32
Lazarus 2.1.0 Trunk x32
OS Win 7 32bit