Solved

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

Posted on 2004-08-13
4
333 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

How our DevOps Team Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

825 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