home *** CD-ROM | disk | FTP | other *** search
- Example of searching a list box quickly!
- ----------------------------------------
-
- A modified solution to the probem posed in the
- March/April issue of BASIC Pro concerning searching a
- list box with Visual Basic. The author, Mitchell Waite,
- correctly states that "setting the ListIndex property in
- Visual Basic is the same as clicking on the list box.
- This will trigger another Click event in the list box.
- Since we would use the Click event handler to change the
- text in the text box, our application could end up in an
- endless loop." However by doing a simple If..Then..EndIf
- statement at the beginning of both the Click event for
- the list box and the Change event for the text, this can
- be avoided. In the If statements we check some indication
- of what the active control is. If it is not the same as
- the control whose code we are performing, we simple exit
- the sub routine. The SEARCH application demonstrates how
- to do this.
-