ListView - Scroll to last item automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear List,

I am using the ListView from CompactFramework. I populate the ListView with
the names of various items I download from the Internet.

As more items are added to the list it eventually reveals its vertical
scrollbar and the items at the bottom of the list are not visible. Is there a
way to have the list scroll automatically to the last added item so I can
visually see what is being added?

Thanks for any suggestions,
Dave
 
davebythesea said:
As more items are added to the list it eventually reveals its vertical
scrollbar and the items at the bottom of the list are not visible. Is
there a way to have the list scroll automatically to the last added
item so I can visually see what is being added?
Any time you add an item, you can call:
listView.EnsureVisible(listView.Items.Count - 1);

listView.Update();

Marc
 
Marc Ambrosius said:
Any time you add an item, you can call:
listView.EnsureVisible(listView.Items.Count - 1);

listView.Update();

Marc

Hi Marc,

Thanks very much, I'll try that!

David
 
Thank you man, I looked everywhere and a lot of people told that this can't be done.
 
Back
Top