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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabControlAdv - showing the tab list programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

74548 Jun 19,2008 12:02 AM UTC Jun 26,2008 03:48 AM UTC WinForms 2
loading
Tags: Tools
Julie Levy
Asked On June 19, 2008 12:02 AM UTC

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 04:53 PM UTC


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 26, 2008 03:48 AM UTC

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.

Warning Icon 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.Close Icon

;