Skip to content

Tip 5.17: You can use * to expand all and / to collapse all in the Toolbox

November 28, 2009
Sara Aside

These keystrokes are not actually specific to the Toolbox, as they work for any standard TreeView control. Sara just calls them out in the Toolbox because this is where she first discovered the * (asterisk) and / (forward slash) in their test-case repository.


Typing * expands everything in the Toolbox. Typing / collapses everything. (Just type the / key; do not use Shift+/ because that will produce a ?.)

Note that the * really does expand all items, including subnodes. In other words, she must warn you: do not, and she really means do not, try to do this at your root c:\ directory. If you do, you’ll get to watch Windows Explorer expand every single folder on your machine, which may take a while.

You can also consider using + (plus sign) and – (hyphen), which work for all standard TreeView controls without expanding all or collapsing all. She just tends to use the standard Right Arrow key to expand and Left Arrow key to collapse so that she doesn’t have to reach as far.

To recap, typing * or + or pressing the Right Arrow key expands the tab.

And pressing / or – or pressing the Left Arrow key collapses the tab.

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio”, courtesy of “Sara Ford”

Sara Ford’s Weblog

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: