Profile Picture

How can I rearrange toolbar commands

Posted By usyber 10 Years Ago
Author
Message
usyber
Question Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 10, Visits: 106
I have a toolbar command where I like to change the position within the toolbar. The following code does not work:

NDiagramCommand cmd = nDiagramCommandBarsManager1.Commander.Commands.GetCommandFromId((int)DiagramCommand.ToggleSnapToGrid);
nDiagramCommandBarsManager1.Commander.Commands.Remove(cmd);
nDiagramCommandBarsManager1.Commander.Commands.Insert(0, cmd);

Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hello usyber,

You will need to create custom toolbars builder class like the one described in this post.
The only difference is that instead of using Add method to add the command use Insert to insert the command in desired position.

I hope this helps.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic