Enter 时的 toolStripTextBox 操作
在 C# Winforms 应用程序中,我使用“toolStripTextBox”工具条控件来捕获一些文本,这些文本将用于过滤表单上的其他一些内容。
从“toolStripSplitButton”中选择“toolStripTextBox”。
用户可以激活文本框并输入文本,但我很难控制用户输入的结束。我希望用户按 ENTER 来完成输入。
我可以检测到已通过按键事件按下了“ENTER”,但这不会将焦点从文本框移开。
有什么想法吗?
In a C# Winforms application, I am using a "toolStripTextBox" toolstrip control to capture some text that is to be used to filter some other content on the form.
The "toolStripTextBox" is selected from a "toolStripSplitButton".
The user can activate the textbox and enter text, but I am struggling to control the end of the user input. What I would like is for the user to press ENTER to complete the input.
I can detect that "ENTER" has been pressed with the key pressed events, but this does not remove the focus away from the text box.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要将焦点发送到下一个控件,请在同一事件上尝试以下代码
to send the focus to next control try the below code on same event