PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Combo/ListBox Auto Search
A useful feature included in comboboxes and listboxes is the ability to search through their contents for specific entries. For example, a list of surnames can easily be navigated by typing the first few letters of the name you require and the control automatically jumps to any matching entries. This is achieved by setting the Sorted property of the listbox or combobox to True in the properties window or in code as follows:
	combo1.Sorted = True

      or

	listbox1.Sorted = True

 In addition this re-orders the contents into alphabetical order and changes the index numbers for all items accordingly. If you intend adding further items, then remember to re-sort the list before auto searching.

 

Top of Page

Legal Notice

Ken Howe 2011