Solved

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

Posted on 2004-08-13
4
346 Views
Last Modified: 2010-04-23
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
Comment
Question by:visualbasic
4 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 50 total points
ID: 11791927
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
 
LVL 28

Expert Comment

by:iboutchkine
ID: 11792092
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to limit User Input 2 33
vb.net Configuration, settings file location? 8 41
vb.net datagrid scroll automatically to the first found row 11 26
Need help with a query 14 32
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question