Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centering ListBox Selection

Status
Not open for further replies.

evoluder

MIS
Dec 4, 2001
21
0
0
US
Hello,

Here is my scenario:

I have a bound textbox for user input. When the user enters a new value and the control loses focus, the new value in the textbox is compared to an array of values. If the new value is not in the array, a form with a listbox pops up. The listbox on this form is populated with the values in the array, the closest match to the new value is selected. If the closest value is near the bottom of the list, the value after it is obscured by the edge of the listbox window (since you would have to scroll down to see more). Does anyone know of a good way to move the selected item to the middle of the listbox window so the user can see the values on either side?

Thank you for any assistance.
 
you might try playing around with the .TopIndex property of the List Box

set it to the index of the next item?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top