找回密码
 立即注册

QQ登录

只需一步,快速开始

miyaminn

论坛元老

48

主题

121

帖子

2万

积分

论坛元老

积分
22182

活字格认证

[已处理] Spread快捷键

miyaminn
论坛元老   /  发表于:2014-12-10 10:19  /   查看:4827  /  回复:1
Spread中按Shift-Tab和Shift-Up,Shift-Down,Tab,Up,Down等
想要没有任何反应
尝试过以下代码也无效果
Dim whenAncestorOfFocused As InputMap =
_vas_Sheet_0.GetInputMap(InputMapMode.WhenAncestorOfFocused)
Dim whenFocused As InputMap =
_vas_Sheet_0.GetInputMap(InputMapMode.WhenFocused)

whenAncestorOfFocused.Put(New Keystroke(Keys.Up, Keys.None),
SpreadActions.None)
whenFocused.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.None)

需要设置什么属性吗?还是7.0的版本写法不同?

以上,谢谢!!!!!!

1 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-12-10 13:44:00
沙发
回复 1楼miyaminn的帖子

请问 _vas_Sheet_0这个类是 FpSpread还是?

Spread 7.0 没有特殊写法,并且我通过您的代码在 8.0 中测试也没有问题,这段代码是禁止 Up 键动作的:

  1.         Dim whenAncestorOfFocused As InputMap = FpSpread1.GetInputMap(InputMapMode.WhenAncestorOfFocused)
  2.         Dim whenFocused As InputMap = FpSpread1.GetInputMap(InputMapMode.WhenFocused)

  3.         whenAncestorOfFocused.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.None)
  4.         whenFocused.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.None)
复制代码


以下这段代码用于控制 Shift+Up 键盘动作:

  1.         Dim im As New FarPoint.Win.Spread.InputMap
  2.         im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
  3.         im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Up, Keys.Shift), FarPoint.Win.Spread.SpreadActions.None)
  4.         im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
  5.         im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Up, Keys.Shift), FarPoint.Win.Spread.SpreadActions.None)
复制代码


谢谢
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部