>/// has a save button just to test things out >public partial class myFormToolStrip : mmToolStrip, ImmNavigationToolBar >{...} >>I try to merge this with the mmNavigationToolStrip, but the merge fails and I can't figure out why.
>/// <summary> >/// Create the navigation toolbar (go around the factory method) >// </summary> >/// <returns>Navigation ToolbarStrip</returns> >protected override void CreateNavToolBar() >{ > mmNavigationToolStrip nts = new mmNavigationToolStrip(); > myFormToolStrip fts = new myFormToolStrip(); > > nts.AllowMerge = true; > fts.AllowMerge = true; > fts.Visible = false; // suggested in online forum, doesn't work either way > > int i = 0; > foreach (ToolStripItem item in fts.Items) > { > item.MergeAction = MergeAction.Append; > int coo = nts.Items.Count + i++; > item.MergeIndex = coo; > } > > bool foo = ToolStripManager.Merge((ToolStrip)fts, (ToolStrip)nts); > //bool foo = ToolStripManager.Merge(fts, nts); > // in both the above lines, foo = false, the merge fails > > this.NavToolBar = nts; > this.Controls.Add(this.NavToolBar); >} >