KeyPress不会在cmbo下拉菜单上捕获TAB [英] KeyPress not trapping TAB on cmbo drop down
本文介绍了KeyPress不会在cmbo下拉菜单上捕获TAB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个组合下拉列表,我想在其中选择TAB和Enter的特定行为. KeyPress事件正在捕获Enter而不是TAB.
有任何想法吗?
I have a combo drop down list where I want particular behaviour for TAB and Enter. The KeyPress event is catching Enter but not TAB.
Any ideas?
推荐答案
尝试KeyDown或KeyUp事件.根据文档,不可见的键不会引发KeyPress事件( http ://msdn.microsoft.com/zh-CN/library/system.windows.forms.control.keypress.aspx [
Try the KeyDown or KeyUp events. According to documentation, non-visible keys do not raise the KeyPress event (http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx[^])
这篇关于KeyPress不会在cmbo下拉菜单上捕获TAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文