Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seeking on each keystroke - I'm stumped.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00184732
Message ID:
00184746
Vues:
23
>It seems I can always think up a 'feature' for my user interface that then is a puzzler to implement.
>
>I have a grid displaying a table (the grid's dynamicforecolor is displaying the selected record).
>
>I'd like to provide a 'find' feature where user can start typing into a textbox and a seek will occur on each keystroke. I've made several false starts with keypress and interactivechange events - keep getting hungup on displaying correctly what the user has typed, much less figuring out where I should grab the value that I can UPPER and then SEEK.
>
>Any comments will be welcome.

Steve,

I'd suggest using a binary search routine. If you create one based on an ordered list, for example, you'll save yourself a lot of trouble. If the list is ordered, you don't need to create an index to do a SEEK. Further, if regardless of the underlying control source, and give the fact that a binary search is the fastest method available, you won't take a performance hit from initiating a new search each time the user hits a key.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform