home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
access
/
diverses
/
expdli
/
expdlist.txt
< prev
Wrap
Text File
|
1995-02-27
|
776b
|
23 lines
Auto Expand List box
This example uses a binary search to find the target in the
ItemData property of the list. It assumes the list is sorted
in ascending order. The search is triggered by the form's timer
event once every second. A search is only done if the SearchVal
has changed.
The SearchVal is built in the KeyPress and KeyUp events of the
txtSearch text box. I have attempted to cover every combination
of changing the text box, including selecting a substring with the
mouse and typing over it. The example list contains over
2000 string elements. The first search is a bit slow, but it is
fast after that. Any comments, negative, positive, or how to improve
it, would be greatly appreciated.
Jim Davis
jddavis@cs.washington.edu