"Resizable" GUI indicator?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

"Resizable" GUI indicator?

Post by JBensimon » 13 Aug 2022, 08:08

Anybody know whether the cool little "resizable" indicator in the lower right-hand corner of some Windows dialogs is the result of an available window Style/ExStyle, or can it only be achieved in an AutoHotkey GUI by explicitly adding (and managing the position of) an image control?

Resizable.png
Resizable.png (4.99 KiB) Viewed 678 times

Thanks.

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: "Resizable" GUI indicator?

Post by swagfag » 13 Aug 2022, 08:15


User avatar
mikeyww
Posts: 26891
Joined: 09 Sep 2014, 18:38

Re: "Resizable" GUI indicator?

Post by mikeyww » 13 Aug 2022, 08:32

Code: Select all

Gui, +Resize
Gui, Font, s10
Gui, Add, Text, w230, Test
Gui, Add, StatusBar
Gui, Show

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: "Resizable" GUI indicator?

Post by JBensimon » 13 Aug 2022, 08:45

Good show, Mikey! Didn't realize the thingy is automatic in a status bar (only if the GUI is in fact resizable).

Now I'll try to make it less obvious that there's an empty status bar present. ;)

Thanks!

JB

toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: "Resizable" GUI indicator?

Post by toralf » 15 Aug 2022, 07:11

When you find a solution, please post. As I’m interested too.
ciao
toralf

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: "Resizable" GUI indicator?

Post by JBensimon » 15 Aug 2022, 11:05

@toralf: Mikey's suggestion (to add a status bar control to the GUI) works perfectly, assuming you can find a use for a status bar or don't mind having a blank status bar separated from the rest of your GUI dialog by a horizontal line. I couldn't find a way to get rid of that separator line (there aren't really any style options documented by Microsoft for status bar controls), so I wound up going for my current purposes with my original thought of just adding a little (8x8) picture control at the bottom right corner of the dialog and moving it as necessary in the dialog's resize routine. Note that the behavior with a picture isn't the same as with a status bar in that the picture itself is not what Microsoft calls a "sizing grip", i.e. you can't click and hold the picture itself to resize the window, you have to go a little further down to grab the edges -- the picture in this case is purely intended to make the user aware that the dialog is resizable.

Now, I do notice that the little "sizing grip" (the dot pattern) also appears in standard File Open/Save dialogs, but not as part of a status bar, and strangely enough Window Spy reports it as a ScrollBar control, so I may look in that direction at some point. Might be some special style available for scrollbars that only shows the resizing block and no actual scrollbar.

Jacques.

User avatar
mikeyww
Posts: 26891
Joined: 09 Sep 2014, 18:38

Re: "Resizable" GUI indicator?

Post by mikeyww » 15 Aug 2022, 11:23

If needed, you could write a script that does resize when a click on the picture is held. It could be something like, get the mouse position, start a timer, recheck mouse position, resize the window, and stop the timer when the button is released.

JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: "Resizable" GUI indicator?

Post by JBensimon » 15 Aug 2022, 11:28

Ha, not worth the effort to avoid having to move the mouse an extra millimeter! ;)

Post Reply

Return to “Ask for Help (v1)”