回复 3楼foamhome1的帖子
可以新建 ChangeEventArgs参数传递行列信息:
- void fpSpread1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
- {
- if (e.Control && e.KeyCode == Keys.V)
- {
- int row=this.fpSpread1.ActiveSheet.ActiveRowIndex;
- int col = this.fpSpread1.ActiveSheet.ActiveColumnIndex;
- FarPoint.Win.Spread.ChangeEventArgs param=new ChangeEventArgs(null,row,col);
- fpSpread1_Change(null, param);
- }
- }
- void fpSpread1_Change(object sender, FarPoint.Win.Spread.ChangeEventArgs e)
- {
- }
复制代码
同时也可以在 Change 事件中通过 Spread 属性拿到当前行列值:
- int row=this.fpSpread1.ActiveSheet.ActiveRowIndex;
- int col = this.fpSpread1.ActiveSheet.ActiveColumnIndex;
复制代码 |