退格键不适用于 IE 工具栏
我正在使用 band 对象在 c#.net 中开发 Internet Explorer 工具栏。
现在在我的工具栏中,我使用文本框字段来启用搜索,但在此文本框字段中,我无法使用退格键、删除键、箭头键和许多其他此类按钮。
我不确定我无法使用这个。请帮我解决这个问题。我发现很多这样的问题,但没有一个有具体的答案。
谢谢
I am developing the Internet Explorer Toolbar in c#.net using the band objects.
Now in my toolbar, I am using the textbox field to make the search enable, but in this textbox field, I am not able to use the backspace, delete, arrow keys and many other such button.
I am not sure about y I am not able to use this. Please help me about this. I found many question posted over like this, but none of them was having the specific answer.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题在于浏览器正在吃掉这些击键的事件,因此解决方案是当文本框接收焦点时将焦点强制到工具栏。
要修复此问题,请将此行添加到工具栏的构造函数中:
同时确保您已按照 此示例。
The problem is that the browser is eating the events for those keystrokes, so the solution is to force focus to the toolbar when the text box receives focus.
To fix it add this line to your toolbar's constructor:
Also make sure you have implemented
TranslateAcceleratorIO()
per this example.将您的代码与此代码进行比较,看看缺少什么。
Compare your code to this one and see what's missing.