combobox

jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

combobox

Post 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
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: combobox

Post 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
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post 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"...??
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: combobox

Post 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
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post 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
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post by jds »

Antonio,
Do you have any idea how to use lIncSearch:=.T.
kind regards
José (jds)
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: combobox

Post by James Bott »

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

James
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post by jds »

of course but even that does not help to get an incremental search on a listbox (alfa handmade or by alfa array)
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: combobox

Post by James Bott »

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

James
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post by jds »

Guys, Antonio,
What FWH version is supporting incremental searching in a listbox??
Kind regards and a good WE
José
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post by jds »

Can I repeat my question : how to get an incremental search in a listbox/combobox ?
Best regards
José
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Post 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é
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: combobox

Post 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
Post Reply