L
Lynn Morrison
Hi, I cannot get this code to work. All I want to do is to fetch 'which'
toolbar button was clicked, so I can act on it...
private: System::Void toolBar1_Click(System::Object * sender,
System::EventArgs * e)
{
int index = toolBar1->Buttons->IndexOf(dynamic_cast<ToolBarButton
*>(e->Button));
switch(index) {
case 0:
break;
case 1:
break;
case 2:
menuItem4_Click(sender,e);
break;
case 4:
ExitmenuItem_Click(sender,e);
break;
};
}
I've tried numerous things, but to no avail.... can anyone help? I am a .NET
noob....
Lynn
toolbar button was clicked, so I can act on it...
private: System::Void toolBar1_Click(System::Object * sender,
System::EventArgs * e)
{
int index = toolBar1->Buttons->IndexOf(dynamic_cast<ToolBarButton
*>(e->Button));
switch(index) {
case 0:
break;
case 1:
break;
case 2:
menuItem4_Click(sender,e);
break;
case 4:
ExitmenuItem_Click(sender,e);
break;
};
}
I've tried numerous things, but to no avail.... can anyone help? I am a .NET
noob....
Lynn