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.
Unfortunately, activation email could not send to your email. Please try again.

TabControlAdv - showing the tab list programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

74548 Jun 18,2008 08:02 PM Jun 25,2008 11:48 PM Windows Forms 2
loading
Tags: Tools
Julie Levy
Asked On June 18, 2008 08:02 PM

Hi -
I want to provide a keyboard shortcut for the user to display the list of tabs in the upper right hand corner. Is there a way to programmatically show this list?
Thanks,
Julie


Julie Levy
Replied On June 19, 2008 12:53 PM


Just to clarify, i'm trying to find a way to programmatically open the PrimitiveTab dropdown.


>Hi -
I want to provide a keyboard shortcut for the user to display the list of tabs in the upper right hand corner. Is there a way to programmatically show this list?
Thanks,
Julie




Fathima Shalini P [Syncfusion]
Replied On June 25, 2008 11:48 PM

Hi Julie,

Thank you for your interest in Syncfusion Products.

If your intention is to provide a keyboard shortcut to programmatically open the primitive tab drop down, it is not possible with default drop down. As a work around we can add ContextMenuStrip and show it when we click the drop down or when we press Ctrl+A. Please refer the below code snippet that illustrates this:


private void tabControlAdv1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == (Keys.Control | Keys.A))
this.contextMenuStrip1.Show(this.tabControlAdv1, new Point(this.tabControlAdv1.TabPrimitivesHost.Location.X,this.tabControlAdv1.TabPrimitivesHost.Location.Y+10));
}

private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
{
if(this.contextMenuStrip1.Items!=null)
this.contextMenuStrip1.Items.Clear();
foreach (TabPageAdv tabpageAdv in this.tabControlAdv1.TabPages)
{ this.contextMenuStrip1.Items.Add(tabpageAdv.Text);
}
}


Please refer the below sample that illlustrates this:

http://websamples.syncfusion.com/samples/Tools.Windows/F74548/main.htm

Please let me know if any concerns.

Regards,
Fathima


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;