回复 1楼autumntree的帖子
LeaveCell 事件是活跃单元格切换时候才会触发,编辑结束事件为 EditModeOff,我的测试代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.EditModeOff += new EventHandler(fpSpread1_EditModeOff);
- this.fpSpread1.LeaveCell += new FarPoint.Win.Spread.LeaveCellEventHandler(fpSpread1_LeaveCell);
- }
- int i = 0;
- void fpSpread1_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
- {
- i++;
- Debug.WriteLine("leavecell = "+i.ToString());
- }
- void fpSpread1_EditModeOff(object sender, EventArgs e)
- {
- this.textBox1.Focus();
- }
复制代码 |