当切换时,我想把上面的工具条部分按钮隐藏与显示,可下面的代码不行呢??
private void tabControl1_TabIndexChanged(object sender, System.EventArgs e)
{
if(this.tabControl1.SelectedIndex==0)
{
//MessageBox.Show("0");
this.toolBarButton2.Visible=false;
this.toolBarButton3.Visible=false;
}
if(this.tabControl1.SelectedIndex=1)
{
//MessageBox.Show("1");
this.toolBarButton2.Visible=true;
this.toolBarButton3.Visible=true;
}
}