Re: tabcontrol by FUnky
FUnky
Mon Mar 13 23:28:51 CST 2006
"fada" <fada@mio.net> wrote in message
news:4415992e$0$29732$4fafbaef@reader2.news.tin.it...
> 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);
}
}