Hi I have successfully compiled a code where I created an array of buttons.
I have added a click event to it like this :
I have a standard event like thisCode:buttons[indexofhashis2]->Click += gcnew System::EventHandler(this, &Execute::GOBUT_Click);
returns error saying Location is not a member of Object^.Code:private: System::Void GOBUT_Click(System::Object^ sender, System::EventArgs^ e) { int x; x = sender->Location.X; }
If you don't understand what i want to do :
I'm trying to create an array of button (user/runtime created buttons) and get different interpretations of the click event depending of wich button is clicked.
For example, if we create buttons[0] I wish to get the 0 or something relevant into the GOBUT_Click event.
Any one knows how to do that?




Reply With Quote