문제

Is there any good/short solution to the subj?

I can think of:

  • get TopItem index (in VirtualMode can it be null before item is created?), if index of needed item is less, then it is invisible, otherwise get bottom visible index (top index + listView.ClientSize.Height / GetItemRect(TopItem).Height) and if index of needed item is more, then it is invisible. Otherwise visible.

  • detect scrolling somehow and do something.

Or maybe there is an easier way?

도움이 되었습니까?

해결책

listView1.Items[SelectedItemIndex].Bounds.IntersectsWith(listView1.ClientRectangle)

This will solve your problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top