Page 1 of 1

change the order of default menu items?

PostPosted: Tue Jun 15, 2021 1:18 pm
by perry
Hi All,
v.7.2.1

Just wondering if anyone has ever changed the order of the default menu buttons via plugin?
e.g.
Capture.PNG
Capture.PNG (5.5 KiB) Viewed 742 times
swap "Close Quote" and "Copy Quote"

I'm aware that you can set the index while you insert
Code: Select all
.InsertTool(index,key)
, just not sure how to change it afterwards (or is possible).

Re: change the order of default menu items?  Topic is solved

PostPosted: Tue Jun 15, 2021 2:46 pm
by nsbandara
As per infragistics article https://www.infragistics.com/community/ ... utton-tool removing tool and adding it back should re-position the tool in toolbar / menu ribbon

Eg. Following code segment will position copy tool at start of toolbar and menu ribbon

Code: Select all
            //reposition copy tool in toolbar
            ToolBase toolToRePosition = salesQuoteEntryForm.UltraToolbarsManager1.Tools["ID_RecordUtilitiesCopy"];
            salesQuoteEntryForm.UltraToolbarsManager1.Toolbars["ToolBar"].Tools.Remove(toolToRePosition);
            salesQuoteEntryForm.UltraToolbarsManager1.Toolbars["ToolBar"].Tools.InsertTool(0, "ID_RecordUtilitiesCopy");

            //reposition copy tool in ribbon group
            RibbonGroup group = salesQuoteEntryForm.UltraToolbarsManager1.Ribbon.Tabs["Main"].Groups["Actions"];
            group.Tools.Remove(toolToRePosition);
            group.Tools.InsertTool(0, "ID_RecordUtilitiesCopy");