Change menu position on toolbar

Hi. Does anyone know how to change the position of a menu on a toolbar?
We have successfully added a new item on the Actions toolbar in Sales Order Tracker, but we want it to show right after “Print Sales Order Acknowledgement” instead of at the bottom of the list like it is now.

image

Here’s our current code:
private void SalesOrderTrackerForm_Load(object sender, EventArgs args)
{
//create a new button tool for UltraWinToolbars
Infragistics.Win.UltraWinToolbars.ButtonTool NewTool = new Infragistics.Win.UltraWinToolbars.ButtonTool(“NewItem”);

// set the Properties of the new menu
NewTool.SharedProps.Caption = “Print Pro-Forma Invoice”;
NewTool.SharedProps.Enabled = true;
NewTool.SharedProps.Visible = true;

//NewTool.SharedProps.AppearancesSmall.Appearance.Image = System.Drawing.Bitmap.FromHicon(SystemIcons.Application.Handle);
baseToolbarsManager.Tools.Add(NewTool);

// add the new created button tool to Action Menu
((Infragistics.Win.UltraWinToolbars.PopupMenuTool)baseToolbarsManager.Tools[“ActionsMenu”]).Tools.Add(NewTool);

// create the Tool clik method of your created tool
NewTool.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(NewTool_ToolClick);
}

Thanks!
-Sharla

1 Like

Instead of
baseToolbarsManager.Tools.Add(NewTool);
Try
baseToolbarsManager.Tools.InsertTool(3,NewTool);
3 is the zero index position.

5 Likes

Thanks for the reply, Jason!
We had to change “InsertTool” to just “Insert” but then it worked great!!

Our final code line:
baseToolbarsManager.Tools.Insert(1,NewTool);

Thank you very much!!
-Sharla

1 Like