Page 1 of 1

two panels - one panel

Posted: 12 Apr 2019 15:19
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?

Re: two panels - one panel

Posted: 12 Apr 2019 15:47
by highend
Nope, a pane has always at least one tab.

Re: two panels - one panel

Posted: 12 Apr 2019 15:54
by 7iben
But that would be very helpful and a more dynamic work.
It would save a click on the toolbar.

Re: two panels - one panel

Posted: 13 Apr 2019 12:46
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

Re: two panels - one panel

Posted: 13 Apr 2019 22:03
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.

Re: two panels - one panel

Posted: 14 Apr 2019 01:34
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.

Re: two panels - one panel

Posted: 14 Apr 2019 10:43
by 7iben
Thank you for the info. I have implemented it now. It works very well.

Re: two panels - one panel

Posted: 18 Jun 2019 11:53
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.