I'm having some trouble with the Win32 listview, and I hope someone has some wisdom. When scrolling very quickly (via the wheel), occasionally, the listview appears to scroll, only to jump back to the selected item so it is in-view. In other words, the list undoes your wheel scroll to show you the selected item at the top/bottom of the list. I realize this sounds very dubious, as the common controls have been beaten to death the world over.
Here's how you can replicate:
- Load up a listview in report mode with about 500 items or so (exact count doesn't matter, you just want several screens of data).
- Select an item in the list and remember what you selected.
- Rapidly scroll the list with the wheel downwards (toward you). We're trying to scroll the selected item out of view as fast as possible. You probably have to use more force than you usually use on the wheel. This won't always happen. You may have to try several times.
- Either the scroll will complete normally, or it will change its mind at the end and pull you back to a view where the selected item is on the screen.
This happens with both regular and virtual listviews. I've tested Win32 and C# on Windows 7 Ultimate.
I made a small WinForms app that exhibits the behavior (requires .NET Framework 3.5). If you'd rather not run arbitrary executables from strangers (I understand), make a new WinForms app, drop a listview in report mode in, add a column, and populate the list in the form load event with 500 increasing integers:
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 500; i++)
{
this.listView1.Items.Add(i.ToString());
}
}