Trigger event when changing value of a textBox C #

1

Well, I'm starting in C # and I'm having a problem. I'm working with Windows form. I'm using the TextChange event in a textbox, and with each key pressed in the field it fires the event. I need the event to be triggered only when the field value is fully "typed" and change focus (javaScript's onchange event type).

Any ideas?

    
asked by anonymous 12.04.2016 / 14:29

2 answers

1

Use event Leave of TextBox .

Ex:

public void textbox1_Leave(object sender, EventArgs e)
{
    //Fazer alguma coisa
}
    
12.04.2016 / 14:34
0

The OnChange event of js in c # is the "Validating" property, it's the same thing, instead of TextChange, use Validating.

    
12.04.2016 / 14:34