Multi Commander > Support and Feedback

Move tab to left/right on the same Panel - shortcut

(1/1)

vsudakou:
Hi,

Currently changing of order of tabs on the same Panel can be done using mouse (drag&drop).

Is it possible to move active tab to left/right relatively to nearby tabs by shortcut?

Thanks.

AlanJB:
Does this reply to your earlier question not work for this situation?

http://forum.multicommander.com/forum/index.php/topic,1969.0.html

vsudakou:

--- Quote from: AlanJB on April 10, 2017, 16:03:24 ---Does this reply to your earlier question not work for this situation?

http://forum.multicommander.com/forum/index.php/topic,1969.0.html

--- End quote ---

@AlanJB, yes - I didn't find appropriate command between "Custom Commands". And I didn't find any hint in documentation whether it's possible to change an order of tabs in panel using scripting...
Maybe there is some not documented way to achieve that?

Jungle:
vsudakou
If it's impossible to reorder, you may swap paths of two tabs.

1. Get current path (e.g. path1)
2. Switch to next (prev) tab and get its path (e.g. path2)
3. Set current tab's path to path1
4. Get back to prev tab and set it's path to path2
5. Go again to next tab if needed.

Maybe it's not as beautiful as it could be, but must be enough as a temp. solution

vsudakou:

--- Quote from: Jungle on April 10, 2017, 19:39:54 ---vsudakou
If it's impossible to reorder, you may swap paths of two tabs.

1. Get current path (e.g. path1)
2. Switch to next (prev) tab and get its path (e.g. path2)
3. Set current tab's path to path1
4. Get back to prev tab and set it's path to path2
5. Go again to next tab if needed.

Maybe it's not as beautiful as it could be, but must be enough as a temp. solution

--- End quote ---

@Jungle, thank you. That works. Here is script in case someone else needs it...

move_tab_to_right:

--- Code: ---@var $spath1 = GetSourcePath();
MC.SetActiveTab PANEL=ACTIVE TAB=NEXT
@var $spath2 = GetSourcePath();
MC.Explorer.Goto SOURCE="{$spath1}"
MC.SetActiveTab PANEL=ACTIVE TAB=PREV
MC.Explorer.Goto SOURCE="{$spath2}"
MC.SetActiveTab PANEL=ACTIVE TAB=NEXT
--- End code ---

move_tab_to_left

--- Code: ---@var $spath1 = GetSourcePath();
MC.SetActiveTab PANEL=ACTIVE TAB=PREV
@var $spath2 = GetSourcePath();
MC.Explorer.Goto SOURCE="{$spath1}"
MC.SetActiveTab PANEL=ACTIVE TAB=NEXT
MC.Explorer.Goto SOURCE="{$spath2}"
MC.SetActiveTab PANEL=ACTIVE TAB=PREV
--- End code ---

Navigation

[0] Message Index

Go to full version