tabcontrol

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
 
F

FUnky

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);

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top