two panels - one panel

Features wanted...
Post Reply
7iben
Posts: 130
Joined: 04 Apr 2019 18:22

two panels - one panel

Post by 7iben »

Is it possible if two panels are open and on the right side all tabs are closed automatically switching to one panel?
So that the right panel is closed and only one panel is open?
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14955
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: two panels - one panel

Post by highend »

Nope, a pane has always at least one tab.
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 130
Joined: 04 Apr 2019 18:22

Re: two panels - one panel

Post by 7iben »

But that would be very helpful and a more dynamic work.
It would save a click on the toolbar.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: two panels - one panel

Post by klownboy »

If I understand you correctly, a short script would do something close to what you want. Like highend stated, you can't close all tabs in a pane (i.e., one must be open). Assign this script to a User-Defined Command in the Run Script category (Menu User > Manage Commands... > Run Script > new...) and place this short script in the script block. See the comments for details on each line.

Code: Select all

  if !(get("#800")) {#800;}  //go into dual pane if not already
  if (get("pane") == "1") {#802;}    //if pane 1 is active activate pane 2 
      seltab 1;         //selects tab 1 in pane 2
      tab("closeothers", 0);  //closes all other tabs in pane 2
      #802; #800;             //activate pane 1 and go to single pane

7iben
Posts: 130
Joined: 04 Apr 2019 18:22

Re: two panels - one panel

Post by 7iben »

Ah, that's really good. Thank you very much for that. :tup:
But to do it I have to create a button right?
Can you rewrite the script to start run if I double-click on the last tab and it closes?
As long as it does not work differently I will first use this solution.
Many Thanks.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: two panels - one panel

Post by klownboy »

7iben wrote: 13 Apr 2019 22:03 But to do it I have to create a button right?
No, you don't have to use a Customized Toolbar Button though you can if you want. As I mentioned above, instead you can use a User-Defined Command. I gave you some basic instructions on how to do that. You can assign the script to run on any key press you want. Look at the help file under Main Menu > User > User-defined Commands for details on how.
7iben wrote: 13 Apr 2019 22:03 Can you rewrite the script to start run if I double-click on the last tab and it closes?
There are certain actions you can perform on a double-click or middle-click of a tab (see Menu Configuration > Tabs and Panes > Tabs and then look for "On double-click". You can't assign a script to run on a double click of a tab.

7iben
Posts: 130
Joined: 04 Apr 2019 18:22

Re: two panels - one panel

Post by 7iben »

Thank you for the info. I have implemented it now. It works very well.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

7iben
Posts: 130
Joined: 04 Apr 2019 18:22

Re: two panels - one panel

Post by 7iben »

Hello, can you please rewrite the script to close the selected page?
At the moment you can only close the right side.
I would also like to close everything on the left, so that remains open on the right.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

Post Reply