GUICONTROL Hide not working as expected with Autosize

Get help with using AutoHotkey and its commands and hotkeys
cdjagain
Posts: 4
Joined: 16 Jul 2014, 17:39

GUICONTROL Hide not working as expected with Autosize

14 May 2019, 09:50

I'm clearing button off a GUI so I can add other options. Don't want to destroy GUI as it causes an annoy flicker, and this is run on a timer.

The code below hides the buttons and shows only the titlebar - as expected, removes 5 buttons

Code: Select all

	Loop, Parse, CList, `n
		{
			hid++
			guicontrol, mygui:Hide, %A_LoopField%
		}
		Gui, mygui:Show, Autosize
But when I add an new single button and Show as below the GUI shows blank/empty spaces where the 5 buttons were hidden + the new button.

Code: Select all

				gui, mygui:add, button,  gthis_link , %A_Loopfield%
				Gui, mygui:Show, Autosize				
Why ? How do I stop the "old" hidden buttons from taking space on the GUI ?
wolf_II
Posts: 2685
Joined: 08 Feb 2015, 20:55

Re: GUICONTROL Hide not working as expected with Autosize

14 May 2019, 11:06

You could try to move the old buttons. Move them to position (0,0) with width and height also 0,0.
Their new position may also be negative, positive values will occupy "real estate" on the GUI.
cdjagain
Posts: 4
Joined: 16 Jul 2014, 17:39

Re: GUICONTROL Hide not working as expected with Autosize

14 May 2019, 11:28

Thanks for the suggestion...

I added

Code: Select all

guicontrol, mygui:Move,  %A_LoopField%, x-100, y-100 w0 h0
didn't make any difference.

As soon as the

Code: Select all

Gui, mygui:Show, Autosize, My BPQ tabs
executes the buttons appear in their original locations, pushing my new buttons to the bottom of the GUI with blanks above :crazy:
wolf_II
Posts: 2685
Joined: 08 Feb 2015, 20:55

Re: GUICONTROL Hide not working as expected with Autosize

14 May 2019, 12:58

try this: guicontrol, mygui:Move, %A_LoopField%, x-100 y-100 w0 h0

Return to “Ask For Help”

Who is online

Users browsing this forum: DRocks, ethanross1a, Google [Bot], ineuw and 160 guests