combobox

combobox

Postby jds » Thu Mar 25, 2010 9: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
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby Enrico Maria Giordano » Thu Mar 25, 2010 9:59 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: combobox

Postby jds » Fri Mar 26, 2010 3: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
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby Enrico Maria Giordano » Fri Mar 26, 2010 4:02 pm

Code: Select all  Expand view  RUN
#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
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: combobox

Postby jds » Fri Apr 16, 2010 3: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"...??
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby Enrico Maria Giordano » Fri Apr 16, 2010 4:35 pm

This should be a working sample but it doesn't work and I don't know why, sorry:

Code: Select all  Expand view  RUN
#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
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: combobox

Postby jds » Fri Apr 16, 2010 6: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
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby jds » Sat Apr 17, 2010 8:28 am

Antonio,
Do you have any idea how to use lIncSearch:=.T.
kind regards
José (jds)
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby James Bott » Fri Apr 23, 2010 6:36 pm

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: combobox

Postby jds » Sat May 08, 2010 8:34 am

of course but even that does not help to get an incremental search on a listbox (alfa handmade or by alfa array)
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby James Bott » Sat May 08, 2010 2:46 pm

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: combobox

Postby jds » Fri May 28, 2010 6:42 pm

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

Re: combobox

Postby jds » Sun Jul 04, 2010 7:16 pm

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

Re: combobox

Postby jds » Sun Jul 04, 2010 7: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é
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: combobox

Postby James Bott » Sun Jul 04, 2010 8: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests