• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

how to scroll to last item of a listview

Hi, if you have a listview being populated with data; what is the command to automatically scroll to the last item being added to that listview
e.g.
 
lvMyItem = House.items.add("House of character")
lvMyItem.add("¬4,000")
etc..

Open in new window

0
borgb002
Asked:
borgb002
1 Solution
 
borgb002Author Commented:
BTW I'm using VB .NET 2008
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
You can use EnsureVisible()
Example

        Dim item As New ListViewItem
        item.Text = "columm 1"
        item.SubItems.Add("column 2")
        Me.ListView1.Items.Add(item)
 
        item.EnsureVisible()

Open in new window

0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now