回复 1楼ilbjyaya的帖子
你好,
鼠标移动更改背景色实现方法如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.MouseMove += fpSpread1_MouseMove;
- }
- private void fpSpread1_MouseMove(object sender, MouseEventArgs e)
- {
- HitTestInformation hif = this.fpSpread1.HitTest(e.X, e.Y);
- int row = hif.ViewportInfo.Row;
- int col = hif.ViewportInfo.Column;
- this.fpSpread1.ActiveSheet.Cells[row, col].BackColor = Color.Red;
- }
复制代码 |