Reputation: 48686
I have a ListView
control on my form and I am trying to get either a Point
or even better, a Rectangle
of each visible item in my ListView. Anyone know of a trick to do this?
Upvotes: 1
Views: 277
Reputation: 29244
What I have done is handle the ListView.DrawSubItem
event, which gives me access to a DrawListViewSubItemEventArgs e
instance with a e.Bounds
property giving me the rectangle you are asking for.
If you don't want to do any drawing on your own just set e.DrawDefault = true;
Here is an example of the results:
Upvotes: 1