taxsoft 你好
你可以使用MouseMove事件和HitTest来获取当前鼠标所在位置的单元格
- int row = -1;
- int col = -1;
- private void fpSpread1_MouseMove(object sender, MouseEventArgs e)
- {
- var hi = fpSpread1.HitTest(e.X, e.Y);
- if (hi != null && hi.Type == FarPoint.Win.Spread.HitTestType.Viewport)
- {
- if (row != hi.ViewportInfo.Row || col != hi.ViewportInfo.Column)
- {
- row = hi.ViewportInfo.Row;
- col = hi.ViewportInfo.Column;
- }
- }
- }
复制代码 |