Hi all,
i'm using an array of button, and i would like to manage the click event of each button in a different way.
this is part of my code:
Code:
array<System::Windows::Forms::Button^>^ pics;
Code:
this->pics = (gcnew array<Button^>(101));
Code:
for(int i=0;i<101;i++){
pics[i] = gcnew Button();
pics[i]->Click += gcnew System::EventHandler(this , &GraphForm::pics_Click);
Controls->Add(pics[i]);
}
Code:
private: System::Void pics_Click(System::Object^ sender, System::EventArgs^ e) { }
I tried to send the button array index (i) as parameter to the handler, but this is not allowed, and from "sender" i can not get a usefulk information to understand which button was clicked.
Thanks a lot for your time,
Tania