解决使用spread时快捷键无反应的情况
来源:互联网 发布:达尔文的资料知和名言 编辑:程序博客网 时间:2024/06/05 02:36
用过spread的朋友可能会碰到这么一种情况:
如果我的画面中有快捷键,比如说“F1”、“F2”、“F3”等等,当你的焦点在spread里边时,
你会发现你定义的那些快捷键有时候不反应,原因是焦点陷入spread里面,导致画面捕捉不到快捷键。
给个画面例子:
对于以上画面中的那些快捷键(画面底部),如果焦点在spread中,就会可能导致“F3”不好用。
解决方法:
在你的画面的构造函数里边加上以下代码
FarPoint.Win.Spread.InputMap im;
//spdResult是你画面中定义的spread的名字。
//WhenFocused:焦点离开时
im = spdResult.GetInputMap(InputMapMode.WhenFocused);
//按回车键和TAB时,焦点移动到下一个单元格
im.Put(new Keystroke(Keys.Enter,Keys.None)
//spdResult是你画面中定义的spread的名字。
//WhenFocused:焦点离开时
im = spdResult.GetInputMap(InputMapMode.WhenFocused);
//按回车键和TAB时,焦点移动到下一个单元格
im.Put(new Keystroke(Keys.Enter,Keys.None)
,SpreadActions.MoveToNextColumnWrap);
im.Put(new Keystroke(Keys.Tab,Keys.None)
im.Put(new Keystroke(Keys.Tab,Keys.None)
,SpreadActions.MoveToNextColumnWrap);
//按→、↓、←、↑时,焦点移动
im.Put(new Keystroke(Keys.Left,Keys.None)
//按→、↓、←、↑时,焦点移动
im.Put(new Keystroke(Keys.Left,Keys.None)
,SpreadActions.MoveToPreviousColumn);
im.Put(new Keystroke(Keys.Right,Keys.None)
im.Put(new Keystroke(Keys.Right,Keys.None)
,SpreadActions.MoveToNextColumn);
//使快捷键有效
im.Put(new Keystroke(Keys.F1,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F2,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F3,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F8,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F10,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F12,Keys.None),SpreadActions.None);
//WhenAncestorOfFocused:得到焦点时
im = spdResult.GetInputMap(InputMapMode.WhenAncestorOfFocused);
im.Put(new Keystroke(Keys.Enter,Keys.None)
//使快捷键有效
im.Put(new Keystroke(Keys.F1,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F2,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F3,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F8,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F10,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F12,Keys.None),SpreadActions.None);
//WhenAncestorOfFocused:得到焦点时
im = spdResult.GetInputMap(InputMapMode.WhenAncestorOfFocused);
im.Put(new Keystroke(Keys.Enter,Keys.None)
,SpreadActions.MoveToNextColumnWrap);
im.Put(new Keystroke(Keys.Tab,Keys.None)
im.Put(new Keystroke(Keys.Tab,Keys.None)
,SpreadActions.MoveToNextColumnWrap);
im.Put(new Keystroke(Keys.Left,Keys.None)
im.Put(new Keystroke(Keys.Left,Keys.None)
,SpreadActions.MoveToPreviousColumn);
im.Put(new Keystroke(Keys.Right,Keys.None)
im.Put(new Keystroke(Keys.Right,Keys.None)
,SpreadActions.MoveToNextColumn);
im.Put(new Keystroke(Keys.F1,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F2,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F3,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F8,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F10,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F12,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F1,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F2,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F3,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F8,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F10,Keys.None),SpreadActions.None);
im.Put(new Keystroke(Keys.F12,Keys.None),SpreadActions.None);
0 0
- 解决使用spread时快捷键无反应的情况
- 解决使用spread时快捷键无反应的情况
- 解决vagrant up无反应的情况
- 关于使用svn checkout时点击无反应的情况
- 解决“打开ArcGIS Server Manager”网页无反应为空白的情况
- 解决打开IE无反应的问题
- 解决焦点在spread中时快捷键不好用的问题
- iOS UIbutton 点击无反应的几种情况
- 解决Everything在windows8下使用失效无反应的问题
- 按钮提交无任何反应的解决情况
- 接入moblink SDK 造成第三方登录无反应情况解决
- 解决ie点击无反应
- 解决npm -v 无反应
- spread的CellType使用
- winxp启动过程中键盘无反应问题的解决
- 解决js location=location无反应的方法
- 解决listview的item点击无反应问题
- 解决VMware打开虚拟机无反应的问题
- 初始Hadoop
- js 中 setTimeout()的用法
- 数据库常见索引解析(B树,B-树,B+树,B*树,位图索引,Hash索引)
- 第十四周OJ(4)求3x3矩阵对角线元素之和
- How to extract data from XML nodes in Scala
- 解决使用spread时快捷键无反应的情况
- Fiddler抓取https包设置
- Android图表超简单实现柱状图、折线图、饼状图(基于MpAndroidChart)
- spring applicationContext.xml 配置文件 详解
- oracle 锁表后,如何定位,并解锁
- web前端开发中浏览器兼容问题(五)
- php标准注释
- Android图片中的三级缓存
- 自定义标签