Toolstrip MergeAction

I'm trying to merge a toolstrip in an MDI child form into the toolstrip of the MDI form. I have two toolstrips in the MDI form and wondered how VB would know which toolstrip to merge it into. To my surprise it didn't choose either of them but instead into used the toolstrip of a PropertyGrid that I have in the MDI form!!

How do I fix this



Answer this question

Toolstrip MergeAction

  • comcy

    On the hosting MDI parent form, there is a property called MainMenuStrip, which you can set to your menu strip to get the merging of menu items to work. You also have to have the child menu strips' AllowMerge properties to true.

    However, I don't think this works for Toolstrips. In order to get Toolstrips to merge you need to do it in code, using

    ToolstripManager.Merge(ChildForm.MyToolstrip1,ParentForm.ParentToolStrip1)

     



  • Juergen Pfeifer

    Thanks, but the toolstrip still resolutely merges with that in the PropertyGrid. I think I need to get a reference to that toolstrip so that I can set its AllowMerge property to False, or use ToolstripManager.RevertMerge on it, but I have no idea how to get such a reference.

  • Toolstrip MergeAction