Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incremental search in text box
Message
From
07/01/1999 02:30:18
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00173082
Message ID:
00173418
Views:
27
>Using a different approach that I have had much success with is by using a container with an entry textbox and another hidden textbox to do the work.
>
>In the first textbox in the InteractiveChange() event, I would apply the new value (however the normal process would handle it) and set the hidden textbox value equal to it...
>
>This.Parent.HiddenTextBox.Value = allt( This.Value )
>
>Then, in the ProgrammaticChange() event of the hidden textbox, I would do whatever searching and setting was desired. This way, you don't have to worry about what keys were pressed and building a string. The THIS.VALUE being passed should always be correct for processing.
>
>
>
>>I'm trying to make a incremental search text box.. where I want to update a list box with the values which matches what user is typing..
>>
>>currently I've written following code in keypress of textbox..
>>
>>IF between(nKeyCode,32,126)
>>
>> lcValue = lcValue + chr(nKeyCode)
>>
>>ENDIF
>>
>>IF nKeyCode = 127
>>
>> lcValue = leftc(lcValue,len(lcValue)-1)
>>
>>ENDIF
>>
>>the problem is, if a user presses home key and delete then the lcvalue is not properly updated...
>>
>>Actually I want the correct value as soon as the user presses any key in keypress event..
>>
>>Pls help..


Thanks for your help..

Actually I just modified my routine and placed it in interactivechange and got the correct value without keeping track of pressed keys..

But I'm facing another problem...

This incremental box and list is in a find dialog where a User can select any field & as he will start typing, list will get updated..

But the problem is there are numeric, logical and date fields also..

Currently I'm writing following sql to generate array for list :-

Sele distinct &lcFldname from (lcAlias) into array laTmpval ;
where Upper(&lcFldname)=upper(lcMatch_with)

but this is giving error in other data types.. My question is do i have to chk all the data types and write a sql statement or there is any other way..

Pls help..
Previous
Reply
Map
View

Click here to load this message in the networking platform