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.

How can you disable the ''Tabbed Document '' option for docked controls

Thread ID:

Created:

Updated:

Platform:

Replies:

54570 Jan 11,2007 08:39 AM Jan 19,2007 11:09 AM Windows Forms 3
loading
Tags: Tools
Guy Mahieu
Asked On January 11, 2007 08:39 AM

In an MDI form using TabbedMDIManager and a DockingManager, I want to prevent the 'Tabbed Document' option from appearing in the docking ropdown of the docked controls. Is there an easy way of achieving this?

Murugan [Syncfusion]
Replied On January 11, 2007 10:24 AM

Hi Guy,

This could be achieved by handling dockingManager1_DockContextMenu and dockingManager1_DockAllow events.

Here is the code snippet:

private void dockingManager1_DockContextMenu(object sender, Syncfusion.Windows.Forms.Tools.DockContextMenuEventArgs arg)
{
Syncfusion.Windows.Forms.Tools.XPMenus.PopupMenu p = arg.ContextMenu;
p.ParentBarItem.Items[2].Visible = false;
}

private void dockingManager1_DockAllow(object sender, Syncfusion.Windows.Forms.Tools.DockAllowEventArgs arg)
{
if (arg.DockStyle == Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed && arg.TargetControl == this )
{
arg.Cancel = true;
}
}

Herewith I have also attached the sample. Please have a look at the sample and let me know if it helps.

MDIChild

Thanks for choosing Syncfusion products.

Regards,
Murugan P.S

Guy Mahieu
Replied On January 16, 2007 04:44 AM

Thanks, it looks like it works. I decided to disable the context menu for the dockingmanager altogether though.

Guy

Murugan [Syncfusion]
Replied On January 19, 2007 11:09 AM

Hi Guy,

Thank you for your update.

Regards,
Murugan P.S

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.

;