简体   繁体   English

退格键不适用于IE工具栏

[英]Backspace not working for IE Toolbar

I am developing the Internet Explorer Toolbar in c#.net using the band objects. 我正在使用band对象在c#.net中开发Internet Explorer工具栏。

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. 我不确定y我无法使用此功能。 Please help me about this. 请帮助我。 I found many question posted over like this, but none of them was having the specific answer. 我发现有很多这样的问题,但是没有一个人有具体的答案。

Thanks 谢谢

将您的代码与代码进行比较,看看缺少了什么。

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: 要解决此问题,请将此行添加到工具栏的构造函数中:

yourTextBox.GotFocus += (sender, args) => OnGotFocus(args);

Also make sure you have implemented TranslateAcceleratorIO() per this example . 另外,请确保已根据此示例实现了TranslateAcceleratorIO()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM