Hi Max,
Thanks for using Essential Tools.
You have to get selected tab header bounds using
GetTabRect method and show the winforms context menu if the mouse up occurs inside the tab rect.
private void tabControlAdv1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
Rectangle rect = this.tabControlAdv1.GetTabRect(this.tabControlAdv1.SelectedIndex);
Point pt = new Point(e.X ,e.Y);
if(rect.Contains(pt))
{
this.contextMenu1.Show(this.tabControlAdv1, pt);
}
}
I have attached a sample. Please refer to it and let me know if this helps you.
Regards,
Mano
Sample_tabControlAdv.zip