?
Solved

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

Posted on 2004-08-13
4
Medium Priority
?
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

650 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