Make Listbox behave like a combobox (sort of)

D

DocBrown

I have a multiselect listbox. When the form opens, the list box height is
240, ie one line high. This makes my form with many listboxes compact until
the user wants to select an item in the listbox. I have the GotFocus event to
set the height to the number of items in the listbox (up to a max size of say
5 lines). The LostFocus event reduces the hight back to one line height.

My question is: If an item is selected, and the user clicks on a different
control, can I make a selected item the one that is visible in my one line
height, ie, set the scroll position?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top