tabcontrol

  • Thread starter Thread starter fada
  • Start date Start date
F

fada

Hi.

I have two tabcontrols in the same form (everyone with tabpages) and a
toolbar. When i click on toolbar button i'd like to know which tabcontrol is
active. I can't use activecontrol property because the routine return the
button.

ideas?

thank you.

fada
 
fada said:
Hi.

I have two tabcontrols in the same form (everyone with tabpages) and a
toolbar. When i click on toolbar button i'd like to know which tabcontrol
is active. I can't use activecontrol property because the routine return
the button.

ideas?

thank you.

fada

It is pretty simple .. here is your toolbar click code.

private void toolBar1_ButtonClick(object sender,
System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

if (e.Button == toolBar1.Buttons[0])

{

MessageBox.Show(tabControl1.SelectedTab.Name);

}

}
 
Back
Top