ListLookup (Autocomplete ComboBox Function)
Posted: 2002-06-01
By: ArchiveBot
Viewed: 66
Filed Under:
Title | Uploaded | Size |
---|---|---|
ListLookup638833202002.zip | 9/3/2020 3:45:00 PM | 3,977 |
By placing a reference to this module (single sub, no API) in a ComboBox_KeyPress event, the combobox will search the list for a match and offer an autocomplete.
Options include allowing for a case-sensitive search and allowing the user to only select from items located in the list (like a Dropdown List)
Backspace key and deleting of highlighted text is supported.
Based on Mike Schaffer's IncrLookup [page 28 of the Visual Basic Source Code Library]. API Call was removed and replaced with a local function, boolean options added, backspace support added, documentation added.
Extensive documentation included in module, including usage and line by line commenting (if PSC's parser puts in extra CR's, it's will get ugly)
Developed and Tested in VB 6. Nothing complex, so it should work in any version, but not tested.
Original Author: Matthew K. Johnson
Inputs
Ascii keystroke (as integer) entered.
Optional Boolean for acting as a Dropdown List.
Optional Boolean for case-sensitive search.
Assumptions
Extensive documentation included in module, including usage and line by line commenting (if PSC's parser puts in extra CR's, it's will get ugly)
Developed and Tested in VB 6. Nothing complex, so it should work in any version, but not tested.
Returns
Nothing. (ComboBox object is modified)
Side Effects
1)User must use a Dropdown Combo or Dropdown list.
2) Delete key is not currently supported fully.
3) When acting as a dropdown list, the user can delete the seleted entry and leave blank.
API Declarations
None.
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.