ListView - Automatically scrolling

  • Thread starter Thread starter Scott H
  • Start date Start date
S

Scott H

If I have a Listview (in report mode) and theres several hundred items
in it, is there any way programatically, to automatically scroll to
the last item...Eg. the same thing that would happen if you were to
click the list to give it focus, and then press the END key.

I think I could do it by Selecting the last Item, but I'd rather not
unselect anything the user had selected...I have multiselect FALSE

Also, another question about listviews, anyone know of a Dot Net
component that I can use as an alternative to Listview. VbAccellerator
has one "Grid2", but its for VB5 and 6, and doesn't seem to work in
Dot Net. I'd like to have something Similar to how Outlook displays
Messages, Eg. Several Columns and then one Column directly underneath
that spans the whole width of the control.

TIA for any help,
Scott
 
OT - but 'several hundred items' in a listbox implies that you don't like
your users. Far too many to be usable. Do you give them a method of
filtering?
 
Hi Scott,

Almost the same answer as Scott, with a little bit difference, when you use
the listview have foreever your eyes on Windows Explorer.

In mine opinion is therefore the solution to create asside of your listview
a treeview the same as with Explorer.

You users will like you because you have taken a solution they already know.

I hope this helps?

Cor
 
* Scott H said:
If I have a Listview (in report mode) and theres several hundred items
in it, is there any way programatically, to automatically scroll to
the last item...Eg. the same thing that would happen if you were to
click the list to give it focus, and then press the END key.

Call the last item's 'EnsureVisible' method.
 
Call the last item's 'EnsureVisible' method.

Thanks Herfried, that did just what I wanted.

I'll give the treeview a think Cor, But it may not be the 'look' I'm
after.

Several hundred may have been an exageration, about 50 at most, and
plenty of filtering options, it was just the "view all" option that
was a bit awkward, having to scroll down to end, which was were users
will most want to look at, I could have done it in reverse order I
suppose.

Thanks for your help.
 
Back
Top