C# wait for user to finish typing in a Text Box

前端 未结 15 1268
无人及你
无人及你 2020-11-27 18:16

Is there a way in C# to wait till the user finished typing in a textbox before taking in values they have typed without hitting enter?

Revised this question a little

15条回答
  •  甜味超标
    2020-11-27 18:22

    You can handle the LostFocus event of the text box which will fire everytime the user finishes typing and navigates away from the text box. Here is the documentation on LostFocus: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.lostfocus.aspx

    However, I am not sure what exactly you are trying to do here as the question is not very clear about what "finish" means.

提交回复
热议问题