I have a listview working in virtual mode, in the LargeIcons view. Retrieves are expensive, so I want to ask for the data for all the visible items. How do I get the start
Just off the top of my head, and I haven't tested this but could you do:
private void GetIndexes(ListView vv, out int startidx, out int count)
{
ListViewItem lvi1 = vv.GetItemAt(vv.ClientRectangle.X+6, vv.ClientRectangle.Y + 6);
ListViewItem lvi2 = vv.GetItemAt(vv.ClientRectangle.X+6, vv.ClientRectangle.Bottom-10);
startidx = vv.Items.IndexOf(lvi1);
int endidx = vv.Items.IndexOf(lvi2);
if (endidx == -1) endidx = vv.Items.Count;
count = endidx - startidx;
}