Search code examples
c#toolstrip

Change Toostrip Order


Im currently adding toolstrips from my seperate modules like:

this.toolStripContainer.TopToolStripPanel.Controls.Add(module.Instance.Toolbar)

Buy they are then in the order that the modules are loaded which isnt very good. Is there any way to re-order them?

Or should I be looking at adding some sort of index to my modules and laoding them in the order that I want the toolstrips?


Solution

  • I ended up adding all the toolstrips to a list... sorting the list by ToolStrip.Tag... and then adding them to the control list...

    This allows the module writer to set a priority for the toolstrip, kind of like toolstrip merging