TransWikia.com

Setting different Window size for `Stack Windows`

Mathematica Asked on August 3, 2021

I think someone has asked this in the past (maybe me), but I don’t remember an answer or workaround.

When selecting Stack Windows from the menu bar e.g.

enter image description here

does any way exist to re-set the size of the resulting stacked windows?

As default sized they just take up too much desktop space:

enter image description here

I can’t find anything obvious in Option Inspector.

Admittedly, just a little thing, but it would save me re-setting each stacked window one-by-one to regain desktop space.

While I’ve asked…specifying where the windows would stack would prove very useful.

One Answer

Basically, we'll manipulate Mathematica, so when you click Stack Windows, the current WindowMargins will be saved, and by clicking Restore Previous Arrangement (which will be defined) we restore the positions.

Find file MenuSetup.tr (Windows folder: Mathematica_directory12.3SystemFilesFrontEndTextResourcesWindows), find for Stack Windows (windows: Stack) and replace it with these two MenuItem

MenuItem["Stack Windows", KernelExecute[CompoundExpression[FrontEnd`lastWindowMargins = AbsoluteCurrentValue[Notebooks[], WindowMargins], FrontEnd`lastWindowSize = AbsoluteCurrentValue[Notebooks[], WindowSize], FrontEndTokenExecute["StackWindows"]]],MenuEvaluator -> Automatic],
MenuItem["Restore Previous Arrangement",KernelExecute[MapThread[(CurrentValue[#1, WindowMargins] = #2; CurrentValue[#1, WindowSize] = #3) &, {Notebooks[], FrontEnd`lastWindowMargins, FrontEnd`lastWindowSize}]],MenuEvaluator -> Automatic],

enter image description here

Notes:

  • Tested on Windows 10 with Mathematica 12.3
  • Do not click Restore Previous Arrangement without clicking Stack Windows first (it won't crash, Messages pops up)
  • Also don't create/open or close a file after clicking Stack Windows, if you want to click Restore Previous Arrangement
  • First time clicking Stack will be a bit slower

Answered by Ben Izd on August 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP