Reputation: 11
I have a dynamically created text box. I want to register a function on the Leave event. How do I do that?
textbox = new TextBox();
Upvotes: 0
Views: 2170
Reputation: 7189
try:
textbox.Leave += new EventHandler(textBoxLeave);
actual handler:
private void textBoxLeave(object sender, EventArgs e)
{
// put your code here
}
Upvotes: 1