locked
Textbox changed event question RRS feed

  • Question

  • On my form i currently have a textbox and im not quite understanding the changed event totaly, What im not getting is, is the event triggerd even if one key has been pressed when it has focus? what im trying todo is wait untill they have stoped typing in it for say 3 seconds befor i want todo something in the changed event, is there a way todo it simply?
    • Moved by David M Morton Wednesday, September 9, 2009 8:48 PM WinForms (From:Visual C# General)
    Wednesday, September 9, 2009 8:47 PM

Answers

  • The change event occurs each time the text in the control changes. So if the user presses a key that causes the text to change (like a letter or number), then the event will occur.

    The only thing I can think of to accomplish what you need is to set up a timer when the text box gets focus (the Enter event) and the respond to the timer event instead of the change event.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Daten Wednesday, September 9, 2009 8:56 PM
    Wednesday, September 9, 2009 8:55 PM

All replies

  • The change event occurs each time the text in the control changes. So if the user presses a key that causes the text to change (like a letter or number), then the event will occur.

    The only thing I can think of to accomplish what you need is to set up a timer when the text box gets focus (the Enter event) and the respond to the timer event instead of the change event.

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by Daten Wednesday, September 9, 2009 8:56 PM
    Wednesday, September 9, 2009 8:55 PM
  • Thank you for clearing that up for me
    Wednesday, September 9, 2009 8:56 PM