I'm currently writing a program that develops an array of buttons at runtime based on user input. I've been able to do a lot of control manipulation using statements like buttonArray[i].name ="button"+i; and buttonArray[i].setBounds=.... etc, but I cannot figure out how to add eventhandlers to each button. I should rephrase that. I've added handlers via
btnArray[i].Click += new EventHandler((button1_Click)); but obviously this only calls one method, button1_Click, and in that method I can't distinguish which button was clicked. Even if I found away to create unique handlers for each button, how could I write the response methods? Any help greatly appreciated. -Nate
