调用 ClipboardCutAsStringSkipHidden Action
- public Form15()
- {
- InitializeComponent();
- ActionMap am = fpSpread1.GetActionMap();
- InputMap im = fpSpread1.GetInputMap(InputMapMode.WhenFocused);
- am.Put("MyClipboardCutAsStringSkipHidden", new MyClipboardCutAsStringSkipHidden());
- im.Put(new Keystroke(Keys.X, Keys.Control), "MyClipboardCutAsStringSkipHidden");
- }
- }
- public class MyClipboardCutAsStringSkipHidden : FarPoint.Win.Spread.Action
- {
- public override void PerformAction(object source)
- {
- if (source is SpreadView)
- {
- SpreadView spread = (SpreadView)source;
- var action = spread.GetActionMap().Get(FarPoint.Win.Spread.SpreadActions.ClipboardCutAsStringSkipHidden);
- action.PerformAction(source);
- }
- }
- }
复制代码 |