jplzh 你好,你好请参考以下代码:- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].FrozenRowCount = 1;
- }
- private void fpSpread1_MouseDown(object sender, MouseEventArgs e)
- {
- if (e.Button == System.Windows.Forms.MouseButtons.Right)
- {
- if (this.fpSpread1.Sheets[0].ActiveRowIndex==0)
- {
- FarPoint.Win.Spread.HitTestInformation hitTest = this.fpSpread1.HitTest(e.X, e.Y);
- int row = hitTest.ViewportInfo.Row;
- int col = hitTest.ViewportInfo.Column;
- this.fpSpread1.Sheets[0].SetActiveCell(row, col);
- }
-
- }
- }
复制代码 |