Split Dual 50:50

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Stef123

Split Dual 50:50

Post by Stef123 »

I know I can dbl-click the divider to split my panes in two equal halves, but is there a way to trigger this in a script or UDC?

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

Re: Split Dual 50:50

Post by admin »

Nope.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Split Dual 50:50

Post by bdeshi »

setlayout()
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Stef123

Re: Split Dual 50:50

Post by Stef123 »

Nice try. It doesn't accept %-values, though, shrinks down the pane to 50px instead.
I am on a roll with favorites in various flavors, and this would have been the icing on the cake. Just as unnecessary, mere eye candy, no problem.
Thanks.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Split Dual 50:50

Post by bdeshi »

set width to half of screenwidth: round(get(screen, w)/2) - width of nav panel(s)
similarly set width to half of windowwidth if that info is available from setlayout(). Don't know, can't find out now.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Split Dual 50:50

Post by TheQwerty »

Code: Select all

"Adjust Pane Sizes"
  if (Get('#800')) {
    $current = SetLayout();
    $dim = Get('#801', 'Height', 'Width');
    $size = RegexMatches($current, 'Pane[12]' . $dim . '=\d+', '+');
    $size = RegexReplace($size, 'Pane[12]' . $dim . '=');
    $size = Eval($size) + GetKey('SplitterWidth', 'General');
    $half = Floor($size / 2);
    SetLayout("Pane1$dim=$half,Pane2$dim=$half");
    Status "Panes resized to a $dim of $half px.",, 'ready';
  } else {
    Status 'Panes are not resized in single pane mode.',,'alert';
  }

Stef123

Re: Split Dual 50:50

Post by Stef123 »

:eh: :shock: Awesome :!: Works no matter what layout I try it on, visible tree, catalog, even single pane cannot crash it. Speed of light. Absolutely amazing.

On a sidenote: I could probably merge it right into favfolders with <crlf>, but for easier editing I decided to put it inside (invisible) CTB menus, using Sammay's trick to call them as sub-menus inside favfolders. :D

Many thanks, you guys are terrific. :tup: :appl:

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

Re: Split Dual 50:50

Post by admin »

Wow, XY is better than I thought. :tup:

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

Re: Split Dual 50:50

Post by klownboy »

That is really cool TheQwerty! :appl: I keep telling myself, I have to learn at least some rudimentary RegEx.

Hi Stef123, so you're using this as sub-menus in Favorite Folders from http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=13603 I ask because I thought you used Session Manager which will obviously saves your layouts as you set them.

Stef123

Re: Split Dual 50:50

Post by Stef123 »

klownboy wrote:I ask because I thought you used Session Manager which will obviously saves your layouts as you set them.
Yes, you're right, Ken. SessionManager kicks off, providing the tabsets for my tasks. Then I modify active locations only (still fine with the overall tabsets). Saving those offsprings into SM is overkill for the SM dropdown. So in the past, I dragged both panes to a catalog instead. But you cannot drag dual, and first you have to go up to drag the parent, or use catalog-flyouts.

So anyway, thanks to Sammay's GUI script I am back to FavFolders. Super-charged, with submenus that I fill by feeding Sammay's auto-generated dual-line into the sub-menus. This not only saves me a lot of mouse travel, it also helps me to abuse favfolders as my personal context menu. Takes care of another wish of mine (clicking with modifier keys) - so I can eat my popup-cake and still have it, the regular popup that I would get w/o the tweak.

And thanks to TheQwerty, I can revert my SessionManager splits to the 50:50 default, for those dual favs that benefit from it. And thanks to Don, I now get my popup everywhere, even in locations not available. If you're not convinced of my insanity by now, get this: To revert back to original SessionManager tabsets I call it up right from the favfolder popup instead of traveling to the SessionManager's CTB proper.

To understand my obsessive dislike of mouse travels, you have to work on machines of graphics artists - their mouse settings drive you nuts. You don't sail across a 30" ocean, you row across it, stroke by stroke.

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

Re: Split Dual 50:50

Post by klownboy »

Thanks Stef123, I'm seeing the Favorite Files and favorite Folders now as being very versatile. They are named Favorites Files and Folders but in actuality you can put anything you want in them regardless of names. Bottom line is, you do the same things you're doing with Favorite Folders to Favorite Files also. You can call out Favorites Files from Favorite Folders menu and visa versa, and you can run scripts. That's why I was happy to see Don updating the right click on white space tweaks such that you can callout Favorite Files or Favorite Folders or run a scripts. It saves running the mouse up to the toolbar or hitting a key combo to run something. I put in a wish hoping he'll also do the same with middle mouse click on white space. Why not, there's a lot of white space around. The way I look at it is, you might as well take advantage of it. This could be in either menu.

Code: Select all

"Vertical Toolbar|D:\Graphics\Icons\XY light.ico" ::load("<xyscripts>\vTB.xys");
"Favorite Files|:favs" ::#564;  //in the Favorite Folders menu
Thanks

Stef123

Re: Split Dual 50:50

Post by Stef123 »

klownboy wrote: They are named Favorites Files and Folders but in actuality you can put anything you want in them
Yes, this discovery has led to a whole new level of efficiency in my workflow. :biggrin:
It also works the other way round. You can "outscource" the contents of favfiles and CTB menus into an XYS file. Nothing new for you veterans around here, but for me this comes as a complete revelation. So much easer to edit than the usual CTB-way of doing it. I can use my favorite editor to open several of them in tabs, for copy and paste, and leave them open, while gathering icons and paths that I need. Regular CTB-edits lock up and always made me go back and forth, not to mention the tiny font, and the window never remembered it's size.....

Now all this has become a breeze, I get snippets and auto-completion of brackets and quotes, and when I hit save I can test it immediately, no more in and out of Edit-modes. :tup:

JoeMarfice
Posts: 53
Joined: 26 Feb 2015 20:37

Re: Split Dual 50:50

Post by JoeMarfice »

Thanks, TheQwerty!

Post Reply