public virtual bool DoMouseMove(Point p, MouseButtons button) { bool res = false; ZenControlBase ctrl = GetControl(p); if (ctrl != null) { if (ctrlWithMouse != ctrl) { if (ctrlWithMouse != null) { ctrlWithMouse.DoMouseLeave(); } ctrl.DoMouseEnter(); ctrlWithMouse = ctrl; } ctrl.DoMouseMove(parentToControl(ctrl, p), button); res = true; } else if (ctrlWithMouse != null) { ctrlWithMouse.DoMouseLeave(); ctrlWithMouse = null; } return(res); }
public virtual void DoMouseEnter() { // Let parent form know so it can show tooltips if needed. TooltipMouseAction(this, true); // Forward leave/enter notifiations to any affected child controls. Point pAbs = MousePositionAbs; Point pRel = new Point(pAbs.X - AbsLeft, pAbs.Y - AbsTop); ZenControlBase ctrl = GetControl(pRel); if (ctrl != null) { if (ctrlWithMouse != ctrl) { if (ctrlWithMouse != null) { ctrlWithMouse.DoMouseLeave(); } ctrl.DoMouseEnter(); ctrlWithMouse = ctrl; } } }