找回密码
 立即注册

QQ登录

只需一步,快速开始

liuwei19840201

中级会员

28

主题

67

帖子

504

积分

中级会员

积分
504

微信认证勋章

liuwei19840201
中级会员   /  发表于:2018-7-20 17:15  /   查看:2977  /  回复:5
本帖最后由 liuwei19840201 于 2018-7-24 08:57 编辑

版本 Spread 10 for winform

输入模式 Normal

希望TextBox在编辑状态下,按下方向键→,能够选择右侧的单元格上。

※非编辑状态下会设定,但是编辑状态,无效。

5 个回复

倒序浏览
Clark.Pan讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2018-7-20 18:01:45
沙发
这个策略就是这样的,编辑状态下有箭头代表光标移动位置,如果不这样那么光标怎样移动。
回复 使用道具 举报
liuwei19840201
中级会员   /  发表于:2018-7-20 18:11:36
板凳
哦哦,个人理解,如果设定了InputMap动作,则遵从InputMap动作来执行。策略「编辑状态下有箭头代表光标移动位置」作为默认策略的话,我就可以少增加代码来进行特殊处理了。既然策略如此,只能通过增加代码特殊处理了。
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2018-7-23 14:53:38
地板
InputMap有WhenFocused 和 WhenAncestorOfFocused两种场景,您需要根据实际需求设置下。

  1. // Create an InputMap object.
  2. FarPoint.Win.Spread.InputMap inputmap1;
  3. // Assign the InputMap object to the existing map.
  4. inputmap1 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);
  5. // Map the Enter key.
  6. inputmap1.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow);
  7. // Create another InputMap object.
  8. FarPoint.Win.Spread.InputMap inputmap2;
  9. // Assign this InputMap object to the existing map.
  10. inputmap2 = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused);
  11. // Map the Enter key.
  12. inputmap2.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow);



复制代码
回复 使用道具 举报
liuwei19840201
中级会员   /  发表于:2018-7-24 08:57:11
5#
好的谢谢
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2018-7-24 17:11:55
6#
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部