Collapse a Sub-Folder and everything within

Hi,

I am trying to create a command that would collapse a folder, and all its sub-folders. I tried;

Go Root=collapse

But, that collapse everything under the current root (ie. including other neighbouring folders at the same level) I just want to collapse all sub-folders underneath my current highlighted folder.

Any idea ?

1 Like

I don't know of a proper way to do that right now so it might be worth sending GPSoft a feature request if you need it.

You might be able to make a button which turns the tree off and then back on again, which sort-of does what you're after but is a bit clunky.

I'm not sure if this helps, but if you press the minus key on the numeric keypad, it collapses the current folder in the tree (provided the tree has focus). Also, plus expands the current branch.

Incidentally, asterisk (*) on the keypad also expands the current branch and all subfolders of the current branch.

Unfortunately, none of these can be bound to commands.

Another Folder Tree collapsing issue I've found is actually a difference to expected behaviour from a generic TreeView control: when you double click over the LINE connecting an expanded folder and its next sibling, then the first folder collapses. This implies that you have to enable Lines first (disabled by default in DO).

You can find this behaviour in almost any TreeView common control (in fact, this is the golden rule of any common control: consistence!). It's specially useful in RegEdit, when you need to collapse a folder that contains a huge amount of subfolders. In that cases you usually don't have at sight the folder to close, so it's much easier to double click on the long vertical lines.

I've seen no option to enable this, am I wrong?

There's no option that I know of. If you want that behaviour you should point it out to GPSoft.