找回密码
 立即注册

QQ登录

只需一步,快速开始

Hjr2350
论坛元老   /  发表于:2013-4-27 14:46  /   查看:4969  /  回复:3
在我点击shape时,按下delete键shape删除,但是现在我想防止其误删除,想把delete功能屏蔽掉

  1.             FarPoint.Win.Spread.InputMap im = new FarPoint.Win.Spread.InputMap();
  2.             im = fp_NodeTemple.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
  3.             im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Delete, Keys.None), FarPoint.Win.Spread.SpreadActions.None);
复制代码

但是发现无法屏蔽,还有其他方法吗?求教

3 个回复

倒序浏览
山水
初级会员   /  发表于:2013-4-27 16:40:00
沙发
你好,
把你的代码略加修改如下,就搞定了:
FarPoint.Win.Spread.InputMap im = fpSpread1.GetInputMapWhenShapeHasFocus();
im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Delete, Keys.None), FarPoint.Win.Spread.SpreadActions.None);
回复 使用道具 举报
Hjr2350
论坛元老   /  发表于:2013-4-27 16:48:00
板凳
谢谢~~
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-4-27 17:41:00
地板
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部