回答1、一方面可以通过Spread的KeyDown事件中实现自己的复制粘贴行为;另外也可以通过改变默认的 InputMap 来实现:
- FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.C, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardCopyValues);
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.C, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardCopyValues);
复制代码
回答2:
- FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardPasteAsStringSkipHidden);
- im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.V, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardPasteAsStringSkipHidden);
复制代码
回答3:
如果现有Action不能完全满足你的需求,你可以继承FarPoint.Win.Spread.Action类型实现自己的需求 |