MJ
Mano J
Syncfusion Team
October 21, 2009 10:32 AM UTC
Hi James,
You can prevent the tab getting selected by cancelling the selected index changing event when right click is made.
private void tabbedMDIManager_TabControlAdded(object sender, Syncfusion.Windows.Forms.Tools.TabbedMDITabControlEventArgs args)
{
tabControl = args.TabControl;
tabControl.SelectedIndexChanging += new SelectedIndexChangingEventHandler(tabControl_SelectedIndexChanging);
}
void tabControl_SelectedIndexChanging(object sender, SelectedIndexChangingEventArgs args)
{
args.Cancel = (Control.MouseButtons == MouseButtons.Right);
}
But it will close only the active tab, not the tab under the mouse.
Regards,
Mano