/// <summary> /// Returns the node under the mouse pointer. /// </summary> /// <param name="x">X screen coordinate.</param> /// <param name="y">Y screen coordinate.</param> /// <returns>The node under the mouse pointer.</returns> public override AccessibleObject HitTest(int x, int y) { TreeNodeAdv node = treeView.GetNodeAt(treeView.PointToClient(new Point(x, y))); if (node != null) { return(new AdvNodeAccessibleObject(node, null, this)); } if (treeView.RectangleToScreen(treeView.ClientRectangle).Contains(x, y)) { return(this); } return(null); }
public override AccessibleObject HitTest(int x, int y) { var p = _tva.PointToClient(new Point(x, y)); if (!_tva.ClientRectangle.Contains(p)) { return(null); } if (p.Y < _tva.ColumnHeaderHeight) { return(_AccHeader); } var tn = _tva.GetNodeAt(p); if (tn != null) { return(tn.Acc); } return(this); }