Event Handling with an array of TextBoxes
Posted on 2003-03-25
hello, i'm new to forms and am having some difficulties. Basically my situation is that i have a 2 dimensional array of TextBoxes, and for each one i need to have an event, so for instance:
TextBox[,] TextArray = new TextBox[10,10];
for(int i=0; i<10; i++)
for(int j=0; j<10; j++)
this.TextArray[i,j].MouseEnter += new System.EventHandler(this.comp_Hover);
the problem is, the comp_Hover method has no idea which TextBox triggered the event, i need some way to convey the information that it was specifically TextArray[i,j] which triggered the event, and i dont know how to do this. Any Suggestions??
Thanks for any help...