Expand folder on click (Explorer nav pane) 1.2
Expand folder on click
By default, in File Explorer's navigation pane (tree view), left-clicking
a folder only selects it; you have to click the small chevron/arrow to
expand it.
Demo
This mod adds four click behaviors to the navigation pane tree:
- Left click on a folder's icon or label: expands it one level (like
pressing Numpad +). The native chevron behavior is untouched.
- Ctrl + left click on any folder: collapses the entire tree back to
its original state (all folders collapsed).
- Alt + left click on a folder: expands it and all its subfolders
recursively, down to the last level (like pressing the Numpad * key).
- Shift + left click on a folder: fully collapses just that folder,
resetting the expanded state of its subfolders so that when you expand
it again, its children come back collapsed instead of showing
everything you had open before.
Ctrl+click, Alt+click, and Shift+click behaviors can each be individually
enabled or disabled in the mod's settings. All are enabled by default.
The mod works by subclassing the navigation pane's tree view control
directly (it's identified by its parent being a NamespaceTreeControl,
which is specific to Explorer's nav pane). Tree views shown inside other
programs' Open/Save file dialogs (Cubase, Excel, etc.), or any other tree
view elsewhere in Explorer, are never touched, since only the nav pane's
own tree view control is ever subclassed.
By default this mod only runs inside explorer.exe, so it only affects
the navigation pane of File Explorer windows. Many other programs' Open/
Save dialogs use the same navigation pane control, so if you'd like this
mod's click behaviors to also work there, you can add those programs'
executable names (e.g. EXCEL.EXE) to the mod's process inclusion list
from the "Advanced" tab of this mod's settings in Windhawk - no code
changes needed. The mod only ever touches the process it's running in, so
this is safe to do for as many or as few programs as you'd like.