Recent

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

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
[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 »
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

ASerge

  • Hero Member
  • *****
  • Posts: 2212
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: 4458
  • I like bugs.
Re: Need Combobox with full text search
« Reply #2 on: March 25, 2019, 08:30:09 pm »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
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
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
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
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

howardpc

  • Hero Member
  • *****
  • Posts: 4144
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

  • Sr. Member
  • ****
  • Posts: 299
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 »
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

 

TinyPortal © 2005-2018