BrightIdeasSoftware.ObjectListView.GetItemAt C# (CSharp) Method

GetItemAt() public method

Find the item and column that are under the given co-ords
public GetItemAt ( int x, int y, OLVColumn &hitColumn ) : OLVListItem
x int X co-ord
y int Y co-ord
hitColumn OLVColumn The column under the given point
return OLVListItem
        public virtual OLVListItem GetItemAt(int x, int y, out OLVColumn hitColumn)
        {
            hitColumn = null;
            ListViewHitTestInfo info = this.HitTest(x, y);
            if (info.Item == null)
                return null;

            if (info.SubItem != null) {
                int subItemIndex = info.Item.SubItems.IndexOf(info.SubItem);
                hitColumn = this.GetColumn(subItemIndex);
            }

            return (OLVListItem)info.Item;
        }
ObjectListView