I have an MdiParent with a UltraToolbarsManager and then all of the forms created in the parent will contain their own identical UltraToolbarsManager controls. This works completely fine except I would like to give the user the ability to pop a child out of the MdiParent into it's own window by setting MdiParent = null, saving the old value to be reset after they dock the window back.
When I set MdiParent of the child control = null the window pops out as expected and the toolbars are no longer merged but the UltraToolbarsManager control of the child control is completely missing. It is no longer merged with the MdiParent nor is it visible on the child control, is there anyway to fix this?
Also, if anyone has anyone better suggestions to setting MdiParent = null to create float/docking I'm all ears. Thanks, Boyd Perkins
It looks like it may be a bug. I would recommend submitting it to the support group: http://es.infragistics.com/gethelp. As a workaround, try setting MdiMergeable to False on the child manager before setting the Form's MdiParent to null.
Please tell me that how you are popping the child out. is it by setting mdiparent = null??
And it will be great help for me if you can send the code related to query like where you are merging the toolbar and what else you aredoing when popping child out.
Thanks.
I have a layer of abstraction between the MdiParent and its children. Its direct child is actually a class derived from Form which manages the children and their state(named TabbedMdiChild). To pop out a child I create a new TabbedMdiChild and leave MdiParent = null. I then add my actual child form to this form which in turn removes it from the form that had MdiParent set. To merge the toolbars I just set the MdiParent.ActiveMdiChildManager = the UltraToolbarsManager of the activeChildForm in TabbedMdiChild. The TabbedMdiChild also has its own UltraToolbarsManager which is what you must use when the child is popped out. When the child isn't popped out you need to make sure to remove the UltraToolbarsManager from the TabbedMdiChild(set DockWithinContainer = null and remove controls associated w/ it). Like I said there is alot of other code that is irrelevant to this functionality so I can't really post sample code. Hope that helps.
Thanks for your prompt reply.
I have added that abstraction layer form as form1(as an mdi) and trying to show the popped out form with in this but the form is appearing but not the child form.
I am pasting my code if you can suggest me any correction.
Form1 is inherited from Form and I have added ultraToolbarsManager in it
using System;using Infragistics.Win.UltraWinToolbars;
namespace GlobalData.FixedIncome.CapitalStructure.ActivityPattern.NavigatorView{ public interface IToolbarManager { UltraToolbarsManager Toolbar { get;set;} }}
#region Class Variable
IToolbarManager _activeFormToolbar;
#endregion Class Variable
private void DockOutCurrentTabAsForm() { if (this.ultraTabbedMdiManager.ActiveTab != null) { //Fisrt approach suggested by infragis support
//IToolbarManager formToolbar = (IToolbarManager)this.ultraTabbedMdiManager.ActiveTab.Form; //UltraToolbarsManager toolbar = formToolbar.Toolbar; //this.ultraToolbarsManager1.ActiveMdiChildManager = null; //toolbar.Visible = true;
//this.ultraTabbedMdiManager.ActiveTab.Form.MdiParent = null;
//toolbar = ((IToolbarManager)this.ultraTabbedMdiManager.ActiveTab.Form).Toolbar; //toolbar.Visible = false; //this.ultraToolbarsManager1.ActiveMdiChildManager = toolbar;
//your approach of abstract form Form currentForm = this.ultraTabbedMdiManager.ActiveTab.Form;
Form1 container = new Form1(); this.ultraTabbedMdiManager.ActiveTab.Form.MdiParent = null; currentForm.MdiParent = container; container.Show();
}
if (this.MdiChildren.Length == 0 || this.MdiChildren.Length == this.ultraTabbedMdiManager.HiddenTabs.Count) this.Visible = false; }
//ShowForm is used to show the child form in Parent TabbedMdi windowpublic void ShowForm(Form objForm) { _activeFormToolbar = (IToolbarManager)objForm; _activeFormToolbar.Toolbar.Visible = false;
//UltraToolbarsManager toolbar = ((IToolbarManager)objForm).Toolbar; //toolbar.Visible = false; //this.ultraToolbarsManager1.ActiveMdiChildManager = toolbar;
//_parentWindow.Visible = true; objForm.MdiParent = this; objForm.Show();
if (this.Visible == true) this.BringToFront(); else this.Show(); }
private void CompanyManagementWindow_MdiChildActivate(object sender, EventArgs e) { if (this.ultraTabbedMdiManager.ActiveTab != null) { _activeFormToolbar = (IToolbarManager)this.ultraTabbedMdiManager.ActiveTab.Form; this.ultraToolbarsManager1.ActiveMdiChildManager = _activeFormToolbar.Toolbar; } }
Regards,
Nishant
Hi,
I had exactly the same problem with the same scenario (merge toolbars when the child form has a mdi parent, unmerge toolbars when the child form is floating). This worked fine until I installed the release v9.1, where the toolbars were not visible after unmerged, even if the Visible property of the toolbars manager was set to true.
After some research using Reflector, I found that calling the method ResetToStandaloneManager() after setting MdiParentManager to null would fix the problem (it resets the boolean flag that prevents the toolbars form showing if they were merged once).
Regards.
David.
Yes, the ResetToStandaloneManager mehtod was added on 10/14/09 as part of the fix for issue TFS20524 to help with this very issue.