BrightIdeasSoftware.ObjectListView.CalculateOwnerDrawnHitTest C# (CSharp) Method

CalculateOwnerDrawnHitTest() protected method

Perform a hit test when the control is owner drawn. This hands off responsibility to the renderer.
protected CalculateOwnerDrawnHitTest ( BrightIdeasSoftware.OlvListViewHitTestInfo hti, int x, int y ) : void
hti BrightIdeasSoftware.OlvListViewHitTestInfo
x int
y int
return void
        protected virtual void CalculateOwnerDrawnHitTest(OlvListViewHitTestInfo hti, int x, int y)
        {
            // If the click wasn't on an item, give up
            if (hti.Item == null)
                return;

            // If the list is showing column, but they clicked outside the columns, also give up
            if (this.View == View.Details && hti.Column == null)
                return;

            // Which renderer was responsible for drawing that point
            IRenderer renderer = this.View == View.Details ? (hti.Column.Renderer ?? this.DefaultRenderer) : this.ItemRenderer;

            // We can't decide who was responsible. Give up
            if (renderer == null)
                return;

            // Ask the responsible renderer what is at that point
            renderer.HitTest(hti, x, y);
        }
ObjectListView