Combo Quick fill while combo is expanded.  
Author Message
Aleniko29139





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

Hi all;

I have a class which uses code Marcia Akins posted here (Thanks Marcia).
The code uses the InteractiveChange of the combo in order to produce a quick fill functionality.
The problem: This won't work when the combo is expanded.
I've tried to utilize the kepress method but it didn't work.
Is there a place I can disable the inherent functionality of the combo when its expanded so it won't interfere with the quickfill functionality

Thank you all.



Visual FoxPro1  
 
 
Don Higgins





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

* Not tested but you might try this

in the GotFocus() event:

if mdown()

nodefault()

endif

Or something similar *might* be a starting point.



 
 
Aleniko





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

Thanks Don - didn't work. Besides, the gotfocus event already has a nodefault statement.

For some reason the combo does some sort of incremental search regardless of the setting.



 
 
CetinBasoz





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

Using a textbox,button and grid you can mimic a better "combo".
 
 
AndyKr





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

>>For some reason the combo does some sort of incremental search regardless of the setting.

A stupid question, but the IncrementalSearch property really is .F. isn't it



 
 
MarciaAkins





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

I've tried to utilize the kepress method but it didn't work.

Well, that is the way to go if you want the incremental search functionality when the combo is open.

You need to remove the code from the combo's InteractiveChange and put this code in the combo's KeyPress:

LPARAMETERS nKeyCode, nShiftAltCtrl

*** handle the key...IOW, find the closest match in the list

IF ( nKeyCode > 31 AND nKeyCode < 128 ) OR ( nKeyCode = 7 )

*** We need this to update the combo's display value

IF This.HandleKey( nKeyCode )

NODEFAULT

ENDIF

ENDIF



 
 
Aleniko





PostPosted: Visual FoxPro General, Combo Quick fill while combo is expanded. Top

Not stupid at all, but yes, it is set to false.

But Marcia's code should work.