Does VFP7 support type ahead? 
Author Message
 Does VFP7 support type ahead?

Is there a type ahead feature for input fields in Foxpro?

Ie. In a customer name field you want to find Microsoft
and you start typing micr and it return microsoft?



Sun, 28 Aug 2005 21:23:47 GMT  
 Does VFP7 support type ahead?
Frank,
Natively - No. Easy to write - yes. It really depends on the source of the data you are looking up
to "fill out" the name. Note: This is normally not referred to as "type ahead", but rather "quick
fill", "lookup" or "incremental search".

Rick

Quote:

> Is there a type ahead feature for input fields in Foxpro?

> Ie. In a customer name field you want to find Microsoft
> and you start typing micr and it return microsoft?



Sun, 28 Aug 2005 22:21:00 GMT  
 Does VFP7 support type ahead?
As Rick says, not natively for textboxes, however incremental search can be
enabled on (say) an ordered listbox. We love it ;-)


Quote:
> Frank,
> Natively - No. Easy to write - yes. It really depends on the source of the

data you are looking up
Quote:
> to "fill out" the name. Note: This is normally not referred to as "type

ahead", but rather "quick
Quote:
> fill", "lookup" or "incremental search".

> Rick




Quote:
> > Is there a type ahead feature for input fields in Foxpro?

> > Ie. In a customer name field you want to find Microsoft
> > and you start typing micr and it return microsoft?



Sun, 28 Aug 2005 23:22:42 GMT  
 Does VFP7 support type ahead?
Frank
quite a few have benn poste in the public domain. If you want to roll your
own using the Keypress event , along these lines:
Local x, n
n=This.SelStart
x =  Left(This.Text ,m.n)
Set Exact Off
Set Near On
=Seek(x,'table', 'indextag')
This.Value=table.field
-Anders


Quote:
> Is there a type ahead feature for input fields in Foxpro?

> Ie. In a customer name field you want to find Microsoft
> and you start typing micr and it return microsoft?



Sun, 28 Aug 2005 23:27:59 GMT  
 Does VFP7 support type ahead?
There are some quick fill textboxes in the Downloads area of the Universal
Thread (www.universalthread.com)


Quote:
> Is there a type ahead feature for input fields in Foxpro?

> Ie. In a customer name field you want to find Microsoft
> and you start typing micr and it return microsoft?



Sun, 28 Aug 2005 23:56:27 GMT  
 Does VFP7 support type ahead?
Thanks Anders.

I searched the Universal Thread for one but to no avail.
Decided to try to roll my own. Seems to work except it
puts the character you just typed in front of the key
returned. I have tried to use clear typeahead and clear
events to no avail.

I type in AB and it finds company ABC and puts it in but
it puts BAB and leaves the cursor after the first B which
I just typed in. Any ideas?

This is what I have in the keypress event of the input
field.

LPARAMETERS nKeyCode, nShiftAltCtrl
Local x, n
n=This.SelStart
IF n < 1 then
        RETURN
ENDIF

x =  UPPER(Left(This.Text ,m.n) + CHR(nKeyCode))
Set Exact Off
Set Near On

IF Seek(x,'cus', 'cus_code') then
        This.Value=cus.cus_code
ELSE
        This.Value = UPPER(ALLTRIM(x))
ENDIF

THIS.SELSTART = LEN(alltrim( x ))

CLEAR events

thisform.Refresh()

Quote:
>-----Original Message-----
>Frank
>quite a few have benn poste in the public domain. If you
want to roll your
>own using the Keypress event , along these lines:
>Local x, n
>n=This.SelStart
>x =  Left(This.Text ,m.n)
>Set Exact Off
>Set Near On
>=Seek(x,'table', 'indextag')
>This.Value=table.field
>-Anders



>> Is there a type ahead feature for input fields in
Foxpro?

>> Ie. In a customer name field you want to find Microsoft
>> and you start typing micr and it return microsoft?

>.



Tue, 30 Aug 2005 03:44:23 GMT  
 Does VFP7 support type ahead?
Setting SelStart seems to be probelmatic in these circumstances.
CLEAR EVENTS ? That will drop you out of your application
CLEAR TYPEAHEAD no reason to
NODEFAULT  last typed charcter will not be added

This type of thing is supported in comboboxes with Style=2. They also have a
property IncrementalSearch
<<
An example of an incremental search is if you are searching for the word
"ELASTIC," you can type E-L-A, and so on. As you type, Visual FoxPro
incrementally searches for the combination of letters you have typed to
match the word you are looking for. Otherwise, it finds the first word that
starts with an E, then the first word that starts with an L, and so on.

Note that the setting of the _INCSEEK System Variable system variable
determines how long to wait for the next letter to be typed. You may need to
adjust the value of _INCSEEK to make incremental searching work properly.

A combo box with the Style property set to 0 (Dropdown Combo) will only show
incremental searching in the text box if the drop-down list is shown. With
the Style property set to 2 (Dropdown List), incremental searching will show
in the text box, regardless of whether the drop-down list is shown.>>

-Anders


Quote:
> Thanks Anders.

> I searched the Universal Thread for one but to no avail.
> Decided to try to roll my own. Seems to work except it
> puts the character you just typed in front of the key
> returned. I have tried to use clear typeahead and clear
> events to no avail.

> I type in AB and it finds company ABC and puts it in but
> it puts BAB and leaves the cursor after the first B which
> I just typed in. Any ideas?

> This is what I have in the keypress event of the input
> field.

> LPARAMETERS nKeyCode, nShiftAltCtrl
> Local x, n
> n=This.SelStart
> IF n < 1 then
> RETURN
> ENDIF

> x =  UPPER(Left(This.Text ,m.n) + CHR(nKeyCode))
> Set Exact Off
> Set Near On

> IF Seek(x,'cus', 'cus_code') then
> This.Value=cus.cus_code
> ELSE
> This.Value = UPPER(ALLTRIM(x))
> ENDIF

> THIS.SELSTART = LEN(alltrim( x ))

> CLEAR events

> thisform.Refresh()

> >-----Original Message-----
> >Frank
> >quite a few have benn poste in the public domain. If you
> want to roll your
> >own using the Keypress event , along these lines:
> >Local x, n
> >n=This.SelStart
> >x =  Left(This.Text ,m.n)
> >Set Exact Off
> >Set Near On
> >=Seek(x,'table', 'indextag')
> >This.Value=table.field
> >-Anders



> >> Is there a type ahead feature for input fields in
> Foxpro?

> >> Ie. In a customer name field you want to find Microsoft
> >> and you start typing micr and it return microsoft?

> >.



Tue, 30 Aug 2005 05:39:44 GMT  
 Does VFP7 support type ahead?
There's file missing. The error message is:
Error in global include file: Include file
'd:\testvfp\ips\include\ppmheadr.h' is not found.
VFP8 saw this as a VFP3 project and asked to convert it. Is it?
-Anders


Quote:
> Frank - I attached a QuickFill textbox to this message that I found on the
> UT.  I needed to incorporate it into my classes, so I borrowed, changed,
> improved (?) the code.



> > Thanks Anders.

> > I searched the Universal Thread for one but to no avail.
> > Decided to try to roll my own. Seems to work except it
> > puts the character you just typed in front of the key
> > returned. I have tried to use clear typeahead and clear
> > events to no avail.

> > I type in AB and it finds company ABC and puts it in but
> > it puts BAB and leaves the cursor after the first B which
> > I just typed in. Any ideas?

> > This is what I have in the keypress event of the input
> > field.

> > LPARAMETERS nKeyCode, nShiftAltCtrl
> > Local x, n
> > n=This.SelStart
> > IF n < 1 then
> > RETURN
> > ENDIF

> > x =  UPPER(Left(This.Text ,m.n) + CHR(nKeyCode))
> > Set Exact Off
> > Set Near On

> > IF Seek(x,'cus', 'cus_code') then
> > This.Value=cus.cus_code
> > ELSE
> > This.Value = UPPER(ALLTRIM(x))
> > ENDIF

> > THIS.SELSTART = LEN(alltrim( x ))

> > CLEAR events

> > thisform.Refresh()

> > >-----Original Message-----
> > >Frank
> > >quite a few have benn poste in the public domain. If you
> > want to roll your
> > >own using the Keypress event , along these lines:
> > >Local x, n
> > >n=This.SelStart
> > >x =  Left(This.Text ,m.n)
> > >Set Exact Off
> > >Set Near On
> > >=Seek(x,'table', 'indextag')
> > >This.Value=table.field
> > >-Anders



> > >> Is there a type ahead feature for input fields in
> > Foxpro?

> > >> Ie. In a customer name field you want to find Microsoft
> > >> and you start typing micr and it return microsoft?

> > >.



Tue, 30 Aug 2005 18:21:49 GMT  
 Does VFP7 support type ahead?
Well, I don't know.  The date on the zip file is 1/20/2000, but the date on
the internal files are from 1995, so it could be.  Basically, I just
borrowed the code and worked it into my framework with some changes.


Quote:
> There's file missing. The error message is:
> Error in global include file: Include file
> 'd:\testvfp\ips\include\ppmheadr.h' is not found.
> VFP8 saw this as a VFP3 project and asked to convert it. Is it?
> -Anders



> > Frank - I attached a QuickFill textbox to this message that I found on
the
> > UT.  I needed to incorporate it into my classes, so I borrowed, changed,
> > improved (?) the code.



> > > Thanks Anders.

> > > I searched the Universal Thread for one but to no avail.
> > > Decided to try to roll my own. Seems to work except it
> > > puts the character you just typed in front of the key
> > > returned. I have tried to use clear typeahead and clear
> > > events to no avail.

> > > I type in AB and it finds company ABC and puts it in but
> > > it puts BAB and leaves the cursor after the first B which
> > > I just typed in. Any ideas?

> > > This is what I have in the keypress event of the input
> > > field.

> > > LPARAMETERS nKeyCode, nShiftAltCtrl
> > > Local x, n
> > > n=This.SelStart
> > > IF n < 1 then
> > > RETURN
> > > ENDIF

> > > x =  UPPER(Left(This.Text ,m.n) + CHR(nKeyCode))
> > > Set Exact Off
> > > Set Near On

> > > IF Seek(x,'cus', 'cus_code') then
> > > This.Value=cus.cus_code
> > > ELSE
> > > This.Value = UPPER(ALLTRIM(x))
> > > ENDIF

> > > THIS.SELSTART = LEN(alltrim( x ))

> > > CLEAR events

> > > thisform.Refresh()

> > > >-----Original Message-----
> > > >Frank
> > > >quite a few have benn poste in the public domain. If you
> > > want to roll your
> > > >own using the Keypress event , along these lines:
> > > >Local x, n
> > > >n=This.SelStart
> > > >x =  Left(This.Text ,m.n)
> > > >Set Exact Off
> > > >Set Near On
> > > >=Seek(x,'table', 'indextag')
> > > >This.Value=table.field
> > > >-Anders



> > > >> Is there a type ahead feature for input fields in
> > > Foxpro?

> > > >> Ie. In a customer name field you want to find Microsoft
> > > >> and you start typing micr and it return microsoft?

> > > >.



Wed, 31 Aug 2005 06:36:53 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Plan Ahead If You Plan Doing Client / Server (Using VFP Graphical Design)

2. Type ahead for Foxpro?

3. VFP8 AutoInc field type not supported in views?

4. VFP ODBC driver support for dynamic cursor type???

5. SQL: Queries of this type are not supported (Error 1814)

6. Will currency type support the Euro?

7. Which C compiler is VFP supporting/supported by

8. FoxPro 2.6Dos getting ahead of itself

9. Cache, read-ahead and pitfalls

10. Delphi gets a step ahead of VFP

11. Cannot support the Microsoft Visual FoxPro support library

12. FPU time is 8 hours ahead of system

 

 
Powered by phpBB® Forum Software