Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用自动完成框,当我按键盘上的 Enter 键时,我想从自动完成框中移除焦点。
我尝试使用 OnKeyDown 方法,但它不会检测到被按下的回车键(它检测到所有其他键)。
如何检测用户按下回车键?
谢谢!
幸好我解决了!(我觉得现在问这个问题有点愚蠢)。
事实证明,虽然 OnKeyDown 适用于大多数控件,但为了检测在使用自动完成控件时按下的回车键,您需要使用 OnKeyUp。
或者 tags, if yes load files
tags, if yes load files