Changing menu size dynamically.

if I have a menu open and change the size of it while its open, will it change size?
If so how would I do that via script?
In this example I'd want to change the bottom right and bottom left screen inside Yanfly's equip core script when I meet certain requirements.
Everything i've looked so far has gotten me dead ends.
Image
You can modify the size of windows while in a scene, yes. You may have to call the windows' refresh functions or recreate their contents.
If so how would I do that via script?
In this example I'd want to change the bottom right and bottom left screen inside Yanfly's equip core script when I meet certain requirements.

this would make the Equipment Slot Window height shorter by 20
JavaScript:
SceneManager._scene._slotWindow.height = SceneManager._scene._slotWindow.height - 20

this would make the Stat Comparison Window height shorter by 20
JavaScript:
SceneManager._scene._compareWindow.height = SceneManager._scene._compareWindow.height - 20

those are just examples of course & you can change it to suit your needs as needed.
It automatically adjusts and refreshes when I did it. Not the font and text but the window itself does change size.

Is that helpful?
Thats super helpful thanks so much.
Do you happen to know how I can arrange the text properly when I move it?
And the one last thing i've been trying to figure out. Is how to I check what equipment slot number is selected and the equipment id when I'm highlighting an item on the menu.
In the second picture, I want the game to return 2 and 50. 2 being the 3rd armor slot and 50 being the 50 id of cloth hat.
1644090127324.png

1644095052100.png
Ok, I got it to the current arrangement.
But the text and dark boxes get cut off no matter what the size is.
Any thoughts on to why?
1644168316997.png

Original thread: https://forums.rpgmakerweb.com/threads/changing-menu-size-dynamically.144656/