keymap新建一个打开searchdialog的action
- public class ShowSearchDialog : FarPoint.Win.Spread.Action
- {
- public override void PerformAction(object source)
- {
- if (source is FarPoint.Win.Spread.SpreadView)
- {
- FarPoint.Win.Spread.SpreadView spread = (FarPoint.Win.Spread.SpreadView)source;
- spread.Owner.SearchWithDialog("");
- }
- }
- }
复制代码
- FarPoint.Win.Spread.InputMap im = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
- FarPoint.Win.Spread.ActionMap am = fpSpread1.GetActionMap();
- im.Put(new FarPoint.Win.Spread.Keystroke(Keys.F, Keys.Control), "ShowSearchDialog");
- am.Put("ShowSearchDialog", new ShowSearchDialog());
复制代码 |