Click to See Complete Forum and Search --> : Listview focus
Rick H
Jan 24th, 2000, 10:44 PM
I have got a listview setup in report mode. If I add more items than will fit on the screen, a slider appears on the right.
How do I get the focus to follow the new data (arriving off the bottom of the visible section) rather than just display the top few items?
Cheers
Joacim Andersson
Jan 24th, 2000, 10:51 PM
Whenever you add a new item to the listview use the following code to change what item is selected:
With ListView1
Set .SelectedItem = .ListItems(.ListItems.Count)
End With
Good luck!
------------------
Joacim Andersson
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)
Rick H
Jan 24th, 2000, 10:58 PM
I tried that, the item gets selected, but the focus remains at the top, any more ideas??
Cheers
[This message has been edited by Rick H (edited 01-25-2000).]
jpark
Jan 25th, 2000, 12:37 AM
ListView1.SelectedItem.EnsureVisible
Joon
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.