本帖最后由 dexteryao 于 2019-3-8 15:04 编辑
spread控制了tab的行为如果不需要可以移除掉spread的控制
FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused).Put(new FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Tab, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.None)
或者在最后一个单元格跳出spread
- private void fpSpread1_KeyUp(object sender, KeyEventArgs e)
- {
- if(e.KeyData==Keys.Tab)
- {
- if(fpSpread1.ActiveSheet.ActiveRowIndex==fpSpread1.ActiveSheet.RowCount-1 && fpSpread1.ActiveSheet.ActiveColumnIndex == fpSpread1.ActiveSheet.ColumnCount - 1)
- {
- Control p;
- p = ((FarPoint.Win.Spread.FpSpread)sender).Parent;
- p.SelectNextControl(ActiveControl, true, true, true, true);
- }
- }
- }
复制代码
|