I don't think there is any support for dragging forms out of the MdiTabbedManager, but I was hoping to implement some mechanism to do that. Does anybody know if this is at all possible?
Alternatively is it possible to add additional tools to the context sensitive menu to take the form out of the Tabbed Manager?
I think all I need to do is to write something like this to get the form out:
form.MdiParent = null;
I'm just looking for a good place to let the user do it.
Regards,
Martin.
I'm getting somewhere with this but the method I have come up with seems quite buggy to say the least. Here is the code:
// *************************************************************************************************** private void TabbedMdiManager_InitializeContextMenu(object sender, MdiTabContextMenuEventArgs e) { MenuItem item = e.ContextMenu.MenuItems.Add("Detach", TabbedMdiManager_DetachClicked); item.Tag = e.Tab; } // *************************************************************************************************** private void TabbedMdiManager_DetachClicked(object sender, EventArgs e) { MenuItem item = sender as MenuItem; if (item != null) { MdiTab tab = item.Tag as MdiTab; if (tab != null) { Form form = tab.Form; form.MdiParent = null; } } }
Two problems with this, first the item in the context menu looks weird (I may be able to fix this by playing the the MenuItem properties):
Secondly when the form is detatched it doesn't have a ribbon and it has two borders around it:
I have a feeling I'm not doing it the way I'm supposed to. Or was it even designed to support the ability to switch between a tab and an a form on its own?
Any ideas?
This seems to fix the issue with the context menu:
MenuItem item = new IGMenuItem("&Detach", TabbedMdiManager_DetachClicked); e.ContextMenu.MenuItems.Add(item); item.Tag = e.Tab;
But I still don't know what to do about the form missing its ribbon and having two borders though.
We got halfway there... They fixed the issue with the form having 2 borders - anything after 9.1 build 2056 or 9.2 build 2017 sounds like it should include this fix.
However, I found that there was a problem with the ribbon. If you opened a form docked in the mdi, and then used the rt-click "detach" menu item on the tab, it left the ribbon on the MDI Parent instead of moving it to the now-undocked child form. This has not been fixed yet. You could try submitting a support request and reference CAS-32312-JB69BM if you need this to work.
Right now, we are getting around the whole issue by closing the mdi child and re-opening a new child form without docking it. This isn't a great solution because it doesn't preserve the layout/context of the view (for example, what nodes are expanded or collapsed on a tree in the view), but it's an ok intermediate solution for us.
Hope this helps!
~Karen
Hi,
Did you get any reply on this? We need to implement exactly the same...
Thanks,
Thanks - I'm submitting a support request too, so hopefully they'll get back to us soon!
We contacted support about this, and this is what they said:
"This is an issue and I am going to log it in our system. You will be notified when it is resolved and a service release for it is out."
That was on August 11th 2009, so hopefully we'll get a fix for it in a future version.
Sorry i can't help with your problem, but I was curious if you'd found an answer? I am trying to do the same thing, and am also seeing 2 form borders around my no-longer-mdi-child, and it is missing it's ribbon.