Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ToolStripManager.Merge with NavToolBar
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01123541
Message ID:
01130136
Views:
31
Hi Matthew,

Did you ever figure this out? I've started on a toolstrip and I'm geting nowhere.
/// 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);
}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform