Page 1 of 3
combobox
Posted: Thu Mar 25, 2010 9:23 pm
by jds
Can someone show me a small example program that makes it possible to search in a combobox an element (f.e. a name) by typing the first characters of that element (f.e. a name)?
Thank You
Kind Regards
Re: combobox
Posted: Thu Mar 25, 2010 9:59 pm
by Enrico Maria Giordano
It's the default behavior of a dropdownlist-style combobox.
EMG
Re: combobox
Posted: Fri Mar 26, 2010 3:26 pm
by jds
Sorry, I am not a professional programmer. Wat is a dropdowlist style combobox. Can you give me an example from source code.
Many thanks and kind regards
jds
Re: combobox
Posted: Fri Mar 26, 2010 4:02 pm
by Enrico Maria Giordano
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := ""
DEFINE DIALOG oDlg
@ 1, 1 COMBOBOX cVar;
ITEMS { "", "Pippo", "Pluto", "Paperino" }
@ 3, 1 BUTTON "Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
EMG
Re: combobox
Posted: Fri Apr 16, 2010 3:24 pm
by jds
The problem is that by typing "pap" the combobox is showing only the first record that matches the "p" in that case "pippo"...??
Re: combobox
Posted: Fri Apr 16, 2010 4:35 pm
by Enrico Maria Giordano
This should be a working sample but it doesn't work and I don't know why, sorry:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oCbx, cVar := ""
DEFINE DIALOG oDlg
@ 1, 1 COMBOBOX oCbx VAR cVar;
ITEMS { "", "Pippo", "Pluto", "Paperino" }
oCbx:lIncSearch = .T.
@ 3, 1 BUTTON "Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
EMG
Re: combobox
Posted: Fri Apr 16, 2010 6:26 pm
by jds
Effectively, I tried already before the "LIncSearch=.T." function(?) but I did not work.
Is there somewhere a description of the LIncSearch function?
kind regards and I wish you a good WE
jds
Re: combobox
Posted: Sat Apr 17, 2010 8:28 am
by jds
Antonio,
Do you have any idea how to use lIncSearch:=.T.
kind regards
José (jds)
Re: combobox
Posted: Fri Apr 23, 2010 6:36 pm
by James Bott
The items in the list have to be in alpha order.
James
Re: combobox
Posted: Sat May 08, 2010 8:34 am
by jds
of course but even that does not help to get an incremental search on a listbox (alfa handmade or by alfa array)
Re: combobox
Posted: Sat May 08, 2010 2:46 pm
by James Bott
I confirm that the incremental search is broken in ver 10.2.
James
Re: combobox
Posted: Fri May 28, 2010 6:42 pm
by jds
Guys, Antonio,
What FWH version is supporting incremental searching in a listbox??
Kind regards and a good WE
José
Re: combobox
Posted: Sun Jul 04, 2010 7:16 pm
by jds
Can I repeat my question : how to get an incremental search in a listbox/combobox ?
Best regards
José
Re: combobox
Posted: Sun Jul 04, 2010 7:19 pm
by jds
Hello
Otto was saying somewhere in may 2010 that incremental search was working in combobox
Please can anyone tell me what is the function to do work it ?
Kind regards
José
Re: combobox
Posted: Sun Jul 04, 2010 8:17 pm
by James Bott
Jose,
It is working, BUT, it is case sensitive (and it should not be).
I will see if I can fix it.
Regards,
James