找回密码
 立即注册

QQ登录

只需一步,快速开始

王先生

注册会员

13

主题

25

帖子

151

积分

注册会员

积分
151
王先生
注册会员   /  发表于:2021-8-19 09:21  /   查看:2050  /  回复:1
50金币
1、 MultiRow10中,有3个格子,分别为:姓名(tabindex:1),性别(tabindex:2),年龄(tabindex:3)。将“性别”的tablestop属性设置为false.
现在按tab键的时候焦点到不了“性别”这个格子上,但是按 ← 键→ 键焦点可以进入,我想将左右键跳的顺序和tab键一致,我想请教一下这个怎么实现。

1 个回复

倒序浏览
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2021-8-19 10:45:48
沙发

            shortcutKeyManager1.DefaultModeList.Add(new GrapeCity.Win.MultiRow.ShortcutKey(((GrapeCity.Win.MultiRow.Action)(GrapeCity.Win.MultiRow.SelectionActions.MoveLeft)), System.Windows.Forms.Keys.Left));
            shortcutKeyManager1.DefaultModeList.Add(new GrapeCity.Win.MultiRow.ShortcutKey(((GrapeCity.Win.MultiRow.Action)(GrapeCity.Win.MultiRow.SelectionActions.MoveRight)), System.Windows.Forms.Keys.Right));


这个是内置的行为,MoveLeft 和 MoveRight总是跳转到左边或者右边的单元格,不会考虑tab,可以换一下

            shortcutKeyManager1.DefaultModeList.Add(new GrapeCity.Win.MultiRow.ShortcutKey(((GrapeCity.Win.MultiRow.Action)(GrapeCity.Win.MultiRow.SelectionActions.MoveToPreviousCell)), System.Windows.Forms.Keys.Left));
            shortcutKeyManager1.DefaultModeList.Add(new GrapeCity.Win.MultiRow.ShortcutKey(((GrapeCity.Win.MultiRow.Action)(GrapeCity.Win.MultiRow.SelectionActions.MoveToNextCell)), System.Windows.Forms.Keys.Right));


换成这个就可以了


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