Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox searching
Message
From
04/03/2005 17:28:53
 
 
To
04/03/2005 16:58:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00992884
Message ID:
00992918
Views:
23
>
>any other thoughts . . .?
>
On this case let the column1 for abv. and two for name..

On interactivechange/keypress method try +or- something as:
procedure interactivechange
if  len(allt(this.value))<3
    return
endif
if  type("this.cmychoice")="U"
    this.addproperty("cmychoice", "")
endif
nwlen = len(allt(this.displayvalue))
for i = 1 to this.listcount
    if  substr(this.displayvalue,1,nwlen)=substr(this.listitem(i,2),1,nwlen)
        cnewvalue                         = this.listitem(i,2)
        this.cmychoice                    = cnewvalue
        this.displayvalue                 = cnewvalue
        This.selstart                     = nwlen
        This.sellength                    = len(allt(this.displayvalue))-nwlen
    endif
endfor

procedure keypress
LPARAMETERS nKeyCode, nShiftAltCtrl
if  nKeycode=13
    if  type("this.cmychoice")="U"
        return
    endif
    for i = 1 to this.listcount
        if  this.cmychoice=this.listitem(i,2)
            this.value        = this.listitem(i,1)
            this.displayvalue = this.listitem(i,1)
        endif
    endfor
ENDIF
PS: not tested !!

HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform