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

How do you always keep the last item visible on a listview

How do you always keep the last item visible on a listview?
As items are added to a listview I want to see the last item added ,scrolling
0
visualbasic
Asked:
visualbasic
1 Solution
 
RonaldBiemansCommented:
use something like this

      Dim x As Integer
      With ListView1
      For x = 1 To 20
      .ListItems.Add Key:="foo" & x, Text:="foo" & x
      Next x
      .SelectedItem = .ListItems("foo20")
      .SelectedItem.EnsureVisible
      End With
      End Sub
0
 
iboutchkineCommented:
or just select the last row
listView1.Items(i).Selected = True

where i is count of the rows
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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