Branch view - Max depth

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Pascal P
Posts: 26
Joined: 24 Dec 2017 11:35

Branch view - Max depth

Post by Pascal P »

Hello,
I wonder if it's possible to display only the X first depths with "Branch view" (or "Flat view").

A tree structure like :

Code: Select all

Depth	File or [Folder]
0	[Folder A]
1		[Folder AA]
2			File AA1
2			File AA2
1		File A1
0	[Folder B]
1		[Folder BB]
2			[Folder BBB]
3				[Folder BBBB]
4					File BBBB 1
3				File BBB1
could display :

- width maxDepth = 1 :

Code: Select all

0	[Folder A]
1		[Folder AA]
1		File A1
0	[Folder B]
1		[Folder BB]
- width maxDepth = 2 :

Code: Select all

0	[Folder A]
1		[Folder AA]
2			File AA1
2			File AA2
1		File A1
0	[Folder B]
1		[Folder BB]
2			[Folder BBB]
- width maxDepth = 3 :

Code: Select all

0	[Folder A]
1		[Folder AA]
2			File AA1
2			File AA2
1		File A1
0	[Folder B]
1		[Folder BB]
2			[Folder BBB]
3				[Folder BBBB]
3				File BBB1
...

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Branch view - Max depth

Post by admin »

Sure, simply add the maxdepth switch with the desired depth:

Code: Select all

E:\Test\a\test? /maxdepth=2 /flat

Pascal P
Posts: 26
Joined: 24 Dec 2017 11:35

Re: Branch view - Max depth

Post by Pascal P »

Thanks, it work very well and it's very useful !

Maybe may we configure it thanks to a more GUI friendly maipulation.
Like in the "Branch view" button (Enable maxdepth | Disable maxdepth | Change maxdepth).
And/Or in the "Branch view" configuration panel for a default maxdepth (0 = infinity).

Thanks !

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Branch view - Max depth

Post by jupe »

While the developer Don considers your request, and assuming you know how to run scripts, I've whipped up a quick example of what is already possible that you may find useful, it will popup a small context menu with options of maxdepth from 0-5 (but you can easily change the options available), scripts can be assigned to toolbar buttons, keyboard shortcuts, run from addressbar etc. which ever suits you best.

Code: Select all

    $index = popupmenu("0|1|2|3|4|5", , , , , 1, "|", , 0);
    if ($index) { 
        $index--;
        goto "? /maxdepth=$index /flat"; }
 

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Branch view - Max depth

Post by admin »

Pascal P wrote:Maybe may we configure it thanks to a more GUI friendly maipulation.
Like in the "Branch view" button (Enable maxdepth | Disable maxdepth | Change maxdepth).
And/Or in the "Branch view" configuration panel for a default maxdepth (0 = infinity).
Not sure if there's enough demand to justify fattening up the GUI even more. I think jupe's solution is the way to go.

BTW, the next version will fix that little glitch in the information bar (the space subsitution character should not be there):
Attachments
2018-01-15_105146.png
2018-01-15_105146.png (5.78 KiB) Viewed 840 times

Post Reply