如何以编程方式从“输入"中删除文本框的焦点? [英] How to remove focus from a TextBox programatically on "enter"?
问题描述
您好,
有人可以向我解释一下如何从TextBox上移开焦点,以便在处理输入"消息时能够进行操作.键,该控件将返回非编辑状态(因此:该控件不再显示插入符号,而仅显示其值)?
我知道我可以将焦点显式设置为另一个控件,但是我想避免明确命名其他控件.
有什么想法吗?
谢谢,
Koen
BTW
仅仅是我还是拥有TextBox真的很不规范控件仅在输入"时接受其值.被按下?实际上,这就是我的问题.
Hi,
Could someone please explain me how I can remove the focus from a TextBox so that when I handle the "enter" key, the control returns to a non-edit state (so: the control doesn't show the caret any longer and just shows its value)?
I know I could set the focus to another control explicitely, but I want to avoid explicit naming of that other control.
Any thoughts?
Thanks,
Koen
BTW
Is it just me, or is it really so non-standard to have a TextBox control only accept its value when "enter" is pressed? That's the context of my question actually.
推荐答案
小障碍
这篇关于如何以编程方式从“输入"中删除文本框的焦点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!