Customize Your Toolbars in Visual Studio 2008: Commands Tab
Menu: Tools -> Customize
Command: Tools.Customize
Versions: 2008
Published: 7/31/2010
Code: vstipEnv0033
You can customize any toolbar in Visual Studio 2008. Just click on the drop-down to the right of any toolbar then click on "Add or Remove Buttons" and choose "Customize":
Alternatively, you can go to Tools -> Customize on the Menu Bar:
Whichever option you choose, you will get the Customize Dialog:
In this case we are going to look at the Commands Tab:
The best way to learn how to customize menus and toolbars is to do an example. In this case, we want to add the ability to select some code then RIGHT CLICK and comment or uncomment the code.
First, we have to go back to the Toolbars Tab and pick the menu or toolbar you want to modify. For our example, we will choose the Context Menus:
Now we click on the Commands Tab and locate the items we want to add. In this case, we dig a bit and find "Selection Comment" and "Selection Uncomment" on in the Edit section:
Now we have to see which menu we want to modify. Click on the Editor Context Menus -> Code Window to see where we want our items to go:
Now CLICK AND DRAG your items where you want them on the menu:
If you want, you can click on the Modify Selection button to reset, delete, modify the name, modify the button image, change the way the item is displayed, or begin a new group:
We would like the new buttons to be in their own group so click on the item just BELOW where we want our group to be:
Now choose "Begin a Group" from the Modify Selection button to get a new group line:
That's it! Close the Customize dialog then select some code and RIGHT CLICK to see if your items show up:
Enjoy!