ListView Scrolling not following SelectedItem?

L

Lars Netzel

I have a long list of Items in a ListView... if I scroll down to something
that is not visible without scrolling and then click on it I open another
window where you can work with the details of that item..
Then I close that window I repopulate the ListView to reflect some changes
make in the details window.. and I re-set the selected Row after the
population of the ListView so the item I was working on is selected again..
but then the scroll is at the top..

How do I make the scroll set so that the selected Item is within the visible
part?

(I have set the Multiselect to false so there can be only one selected)

/Lars Netzel
 
G

Guest

Call the EnsureVisible method of the ListViewItem you want to make visible:
ListView1.Items(N).EnsureVisible

When N is the Index of the Item you want.
 

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