Couple event to dynamic textbox

  • Thread starter Thread starter Mobileboy36
  • Start date Start date
M

Mobileboy36

Hi all,

Is it possible to couple an event to x dynamically created textboxes??
Creating the controls dynamically is not that difficult. But how do I couple
an event to each created control?

Any help would be greatly apprciated.

Best regards
 
Hi,

You must add an event handler for the event you want, see the
following exampe for TextChanged event on a TextBox:

CustomTextBox1.TextChanged+=new
EventHandler(CustomTextBox1_OnTextChanged);

public void CustomTextBox1_OnTextChanged(object sender, EventArgs e)
{
// your code here
}

BR

Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top