We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Close TabPageAdv by Middleclick

Hello,

i'm currently using Syncfusion 8.4.0.10 TabControlAdv with TabPageAdv.

How can i close a TabPageAdv by Mouse-Middleclick?

Best regards

Daniel


3 Replies

LS Lingaraj S Syncfusion Team November 25, 2010 06:40 AM UTC

Hi Daniel,

Thank you for your interest in Syncfusion products.

Please try using TabPageAdv.Close method in MouseUp event to achieve your requirement.

Refer the code below:

this.tabControlAdv1.MouseUp += new MouseEventHandler(tabControlAdv1_MouseUp);
void tabControlAdv1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle && this.tabControlAdv1.GetTabRect(this.tabControlAdv1.SelectedIndex).Contains(e.Location))
{
this.tabControlAdv1.TabPages[this.tabControlAdv1.SelectedIndex].Close();
}
}


Please let me know if you have any queries.

Regards,
Lingaraj S.



DR Daniel Rottschäfer November 25, 2010 09:37 AM UTC

Thank you.



JJ Jeraldes J Syncfusion Team November 25, 2010 09:44 AM UTC

Hi Daniel,

Thanks for your update.

Please let us know if you need any other details.

Regards,
Jeraldes J


Loader.
Live Chat Icon For mobile
Up arrow icon