FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour combobox
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
combobox
Posted: Thu Mar 25, 2010 09:23 PM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox
Posted: Thu Mar 25, 2010 09:59 PM

It's the default behavior of a dropdownlist-style combobox.

EMG

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Fri Mar 26, 2010 03:26 PM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox
Posted: Fri Mar 26, 2010 04:02 PM
Code (fw): Select all Collapse
#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
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Fri Apr 16, 2010 03:24 PM

The problem is that by typing "pap" the combobox is showing only the first record that matches the "p" in that case "pippo"...??

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: combobox
Posted: Fri Apr 16, 2010 04:35 PM
This should be a working sample but it doesn't work and I don't know why, sorry:

Code (fw): Select all Collapse
#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
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Fri Apr 16, 2010 06:26 PM

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

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Sat Apr 17, 2010 08:28 AM

Antonio,
Do you have any idea how to use lIncSearch:=.T.
kind regards
José (jds)

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: combobox
Posted: Fri Apr 23, 2010 06:36 PM

The items in the list have to be in alpha order.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Sat May 08, 2010 08:34 AM

of course but even that does not help to get an incremental search on a listbox (alfa handmade or by alfa array)

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: combobox
Posted: Sat May 08, 2010 02:46 PM

I confirm that the incremental search is broken in ver 10.2.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Fri May 28, 2010 06:42 PM

Guys, Antonio,
What FWH version is supporting incremental searching in a listbox??
Kind regards and a good WE
José

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Sun Jul 04, 2010 07:16 PM

Can I repeat my question : how to get an incremental search in a listbox/combobox ?
Best regards
José

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: combobox
Posted: Sun Jul 04, 2010 07:19 PM

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é

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: combobox
Posted: Sun Jul 04, 2010 08:17 PM

Jose,

It is working, BUT, it is case sensitive (and it should not be).

I will see if I can fix it.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10