Long Gui, not all the controls are visible - window gets cut off Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Yogi
Posts: 12
Joined: 06 Jul 2022, 23:03

Long Gui, not all the controls are visible - window gets cut off  Topic is solved

Post by Yogi » 20 Sep 2022, 20:58

Hi there, I have a GUI that does not have a specified height as the GUI is filled with heavily variable information in different controls that is very difficult to predict.
I have implemented a feature that allows the GUI to slide up to compensate for this and I would greatly prefer not so set up a scroll bar for this particular window.

The problem is that the GUI can be cut off with long variables. It will show half of a control at the bottom, with others below it missing from view completely.
This is when a height is not specified. If I specify a height, this doesn't happen but of course I would have considerable blank space in a lot instances.

The documentation says:
If there is no previous size, the window will be auto-sized according to the size and positions of the controls it contains.
However, the window height doesn't fill to the controls as specified when it's particularly long (running-off screen), something else is limiting that height.
Is there any solution to force it to set the height according to the controls? AutoSize does not work unfortunately.

Thank you.

EDIT:
I've manged to fix it by showing the GUI, and then using the autosize AFTER showing it.

Code: Select all

Gui, Show
Gui, Show, AutoSize

Return to “Ask for Help (v1)”