关于toolBar事件
private void toolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
{
if (e.Button.Name == "toolBarButton3")
{
this.label1.Text = "wwwwwwwww";
}
}
private void button1_Click(object sender, EventArgs e)
{
}
========
当的点击button1_Click时触发toolBar中Button.Name==“toolBarButton3”
------解决方案--------------------
private void button1_Click(object sender, EventArgs e)
{
ToolBarButtonClickEventArgs te = new ToolBarButtonClickEventArgs(toolBarButton3);
toolBar1_ButtonClick(toolBarButton3,te);
}