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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabbedMDIManager & DockingManager Context Menus

Thread ID:

Created:

Updated:

Platform:

Replies:

70117 Nov 27,2007 11:45 PM UTC Nov 28,2007 10:02 AM UTC WinForms 1
loading
Tags: Tools
mitul
Asked On November 27, 2007 11:45 PM UTC

Hi,

I am using both a TabbedMDIManager & DockingManager.

Some of my dockable windows are set as tabs in the mdi container.

When the user right clicks on a tab, I would like to:

1) not show the context menu when right clicking on a MDI Form tab (i.e. not a docked window), and

2) to show the context menu for the tabbed docked windows with the TabbedMDIManager context menu items removed (create new horizontal tab, etc) and show only the DockingManager items (dockable, floating, etc).

Can you please let me know how can this be achieved?

Thanks in advance,
Mitul


Administrator [Syncfusion]
Replied On November 28, 2007 10:02 AM UTC

Hi Mitul,

Thank you for your interest in Syncfusion products.

Removing TabbedMDIManager Context menu items on tabbed docked Form.

If you wish to remove TabbedMDIManager Context menu items on tabbed docked Form, then you could do so by
deriving from TabbedMDIManager as shown below :

[C#]

public class CustomTabbedMDIManager : TabbedMDIManager
{
public CustomTabbedMDIManager() : base() { }
protected override void ContextMenu_BeforePopup(object sender, CancelEventArgs e)
{

ParentBarItem popupMenuParentBarItem = sender as ParentBarItem;
foreach (BarItem bitem in popupMenuParentBarItem.Items)
{

if (bitem.Text == "&Close" || bitem.Text == "New Hori&zontal Tab Group" || bitem.Text == "New &Vertical Tab Group")
{
popupMenuParentBarItem.Items.Clear();
break;

}
e.Cancel = true;

}

base.ContextMenu_BeforePopup(sender, e);
}
}

Here is a sample for your reference.

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

In the sample, make the docked window to tabbed document using 'Tabbed Document' option. In the TabbedMDIForm, right click it to see the dock options.

Please let me know if this helps you.

Regards,
Jaya


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

;