Sync selected cols & widths in 2 pane-mode

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 692
Joined: 15 Feb 2016 21:08

Sync selected cols & widths in 2 pane-mode

Post by MBaas »

Is there a way to easily sync the selection of displayed columns and their respective widths when working with 2 panes?
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * * LinkTree

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Sync selected cols & widths in 2 pane-mode

Post by TheQwerty »

If you plan to do this frequently then I'd suggest a script:

Code: Select all

"Copy Column Layout to Inactive Pane"
  $flags = 1+2; // visibility + widths

  $columns = setColumns(, $flags);
  focus 'PI';
  setColumns($columns, $flags);
  focus 'PI';
This gets the column visibility and widths from the active pane, switches to the inactive pane, applies those columns, then activates the original pane again.

The less automated way would be to use the column layout commands:
View | Columns | Save Column Layout As...
View | Columns | Load Column Layout...

Save the layout, switch panes, and then load the layout - this has the advantage of you probably won't need to save the columns as often as you'll load them. This too can be automated using the ColumnLayout() scripting function.


One lazy technique I've used to achieve this is to create a new tab (which will inherit the current tab's settings) and then move that tab to the other pane and change its location.

MBaas
Posts: 692
Joined: 15 Feb 2016 21:08

Re: Sync selected cols & widths in 2 pane-mode

Post by MBaas »

Thanks for that script! I also like your idea with the copied & moved pane, nice & slick :appl:
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * * LinkTree

Post Reply